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

Interactively adding a breakpoint may not work #23

Closed
timholy opened this issue Dec 13, 2012 · 3 comments
Closed

Interactively adding a breakpoint may not work #23

timholy opened this issue Dec 13, 2012 · 3 comments

Comments

@timholy
Copy link
Contributor

timholy commented Dec 13, 2012

I set @debug begin...end around base/pkg.jl's "_resolve" function, as well as some other functions. With these additions, line 194 corresponds to if has(have,pkg).

After stepping through the early parts of the function, I got to a place where I wanted to set a breakpoint on each iteration of that loop. I got this:

debug:194> add($bp, $n)
no method add(Set{Node{T}},Node{ExValue})

debug:194> $bp
Set{Node{T}}()

debug:194> $n
^CNode(ExValue(:if,

debug:194> s

at /home/tim/src/julia/base/pkg.jl:195

Executing $n caused the prompt to hang, so I hit Ctrl-C.

@toivoh
Copy link
Owner

toivoh commented Dec 13, 2012

Ah, the trouble with add must be because Pkg.add shadows Base.add. You would probably have been able to do it with Base.add($bp, $n) in this case. But there should of course be a way that always works. I'll make $(add(bp,n)) and $add($bp, $n) work consistently.

The trouble with printing $n might stem from the fact that the decorated AST is circular. I though I had fixed that, but I'll take a look to see that nodes are printable.

@toivoh
Copy link
Owner

toivoh commented Dec 13, 2012

Ok, I have really no idea why showing$n caused a hang. Please file it as a separate issue if you can reproduce it.

@timholy
Copy link
Contributor Author

timholy commented Dec 13, 2012

Thanks for the quick fixes and improvements!

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