Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kwargs interfering with bp add #247

Closed
staticfloat opened this issue Apr 1, 2020 · 2 comments
Closed

kwargs interfering with bp add #247

staticfloat opened this issue Apr 1, 2020 · 2 comments

Comments

@staticfloat
Copy link
Contributor

Example:

using Debugger, HTTP
@enter HTTP.get("http://geo.pkg.julialang.org/meta"; status_exception=false)

Debugging session:

julia> using Debugger, HTTP
       @enter HTTP.get("http://geo.pkg.julialang.org/meta"; status_exception=false)
In #get#12(kw, , a) at /Users/sabae/.julia/dev/HTTP/src/HTTP.jl:389
>389  get(a...; kw...) = request("GET", a...; kw...)

About to run: (NamedTuple)()
1|debug> bp add request
[ Info: added breakpoint for function request
1] request

1|debug> c
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Server: nginx/1.17.9
Date: Wed, 01 Apr 2020 00:21:26 GMT
Content-Type: application/json
Content-Length: 142
Connection: keep-alive

{"artifacts_cached": 97,"pkgserver_version": "0.1.0-59c61013465d37ee37f6318c07f26417c2548627","julia_version": "1.3.1","packages_cached": 511}"""

julia>

Excluding the status_exception=false kwarg causes the breakpoint to be successfully hit:

julia> using Debugger, HTTP
       @enter HTTP.get("http://geo.pkg.julialang.org/meta")
In get(a) at /Users/sabae/.julia/dev/HTTP/src/HTTP.jl:389
>389  get(a...; kw...) = request("GET", a...; kw...)

About to run: (tuple)(Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}(), HTTP.get)
1|debug> bp
1] request

1|debug> c
Hit breakpoint:
In request(method, url) at /Users/sabae/.julia/dev/HTTP/src/HTTP.jl:314
 312  function request(method, url, h=Header[], b=nobody;
 313                   headers=h, body=b, query=nothing, kw...)::Response
>314      return request(HTTP.stack(;kw...), string(method), request_uri(url, query), mkheaders(headers), body; kw...)
 315  end

About to run: (getindex)(Pair{SubString{String},SubString{String}})
1|debug>

I will note that during this process, I run into #246 pretty often.

@KristofferC
Copy link
Member

Dup of JuliaDebug/JuliaInterpreter.jl#371?

@staticfloat
Copy link
Contributor Author

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants