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

debug whole file #269

Merged
merged 13 commits into from
Feb 16, 2020
Merged

debug whole file #269

merged 13 commits into from
Feb 16, 2020

Conversation

pfitzseb
Copy link
Member

@pfitzseb pfitzseb commented Feb 10, 2020

Outstanding issues:

  • REPL mode switching is broken.
  • We should get rid of unnecessary return statements in top-level code.

Related issues:

Also finally fixes JunoLab/Juno.jl#118.

@codecov
Copy link

codecov bot commented Feb 10, 2020

Codecov Report

Merging #269 into master will increase coverage by 3.12%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #269      +/-   ##
==========================================
+ Coverage   50.83%   53.95%   +3.12%     
==========================================
  Files          41       42       +1     
  Lines        2093     2311     +218     
==========================================
+ Hits         1064     1247     +183     
- Misses       1029     1064      +35     
Impacted Files Coverage Δ
src/completions.jl 85.48% <0.00%> (ø) ⬆️
src/datatip.jl 78.12% <0.00%> (ø) ⬆️
src/static/toplevel.jl 97.14% <0.00%> (ø) ⬆️
src/workspace.jl 78.37% <0.00%> (ø) ⬆️
src/goto.jl 86.89% <0.00%> (ø) ⬆️
src/display/showdisplay.jl 24.75% <0.00%> (ø) ⬆️
src/utils.jl 89.77% <0.00%> (ø) ⬆️
src/display/errors.jl 38.29% <0.00%> (ø) ⬆️
src/eval.jl 69.86% <0.00%> (ø) ⬆️
src/debugger/workspace.jl 0.00% <0.00%> (ø) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea89450...2d9cce1. Read the comment docs.

@aviatesk
Copy link
Member

Will give a review later.

src/debugger/stepper.jl Outdated Show resolved Hide resolved
@aviatesk
Copy link
Member

Why is there a problem in REPL mode switching ? I still can't see why only toplevel debugging has he issue ...

@pfitzseb
Copy link
Member Author

Because it's not started from the REPL, and asynchronously switching REPL modes doesn't work well.

pfitzseb and others added 2 commits February 13, 2020 17:28
prettier current code rendering for frames in unsaved editor
for (i, (mod, ex)) in enumerate(exprs)
lc == :stop && break

temp_bps = add_breakpoint.(Atom.rpc("getFileBreakpoints"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this ? Aren't breakpoints added in startdebugging anyway for now ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do, yeah. Not entirely sure why though :P

@aviatesk
Copy link
Member

Because it's not started from the REPL, and asynchronously switching REPL modes doesn't work well.

Isn't possible to "pretend" that it's started from REPL when we call debug_file ?

@aviatesk
Copy link
Member

@pfitzseb d4d36ac and JunoLab/atom-julia-client@a14acef works nicely as far as I've tested, great work ! Code certainly looks really hacky though.

@aviatesk
Copy link
Member

aviatesk commented Feb 15, 2020

I occasionally get the following error (when e.g. after use some debugging command):

RROR: syntax: invisible character \u200b near column 1
Stacktrace:
 [1] top-level scope at none:0
 [2] eval at .\boot.jl:331 [inlined]
 [3] eval_code(::JuliaInterpreter.Frame, ::Expr) at ~\julia\packages\JuliaInterpreter\src\utils.jl:481
 [4] eval_code(::JuliaInterpreter.Frame, ::String) at ~\julia\packages\JuliaInterpreter\src\utils.jl:462
 [5] interpret at ~\julia\packages\Atom\src\debugger\repl.jl:94 [inlined]     
 [6] interpret at ~\julia\packages\Atom\src\debugger\repl.jl:93 [inlined]
 [7] (::Atom.JunoDebugger.var"#65#66")(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at ~\julia\packages\Atom\src\debugger\repl.jl:40
 [8] #invokelatest#1 at .\essentials.jl:710 [inlined]
 [9] invokelatest at .\essentials.jl:709 [inlined]
 [10] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at ~\julia\julia\usr\share\julia\stdlib\v1.5\REPL\src\LineEdit.jl:2354
 [11] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface) at ~\julia\julia\usr\share\julia\stdlib\v1.5\REPL\src\LineEdit.jl:2348
 [12] debugprompt() at ~\julia\packages\Atom\src\debugger\repl.jl:56
 [13] (::Atom.JunoDebugger.var"#53#55")() at .\task.jl:358

Do you think you can fix this within the current approach ?

@pfitzseb
Copy link
Member Author

That happens when hideprompt is called while the debugger (or another repl mode that's not closed with backspace) is active. I thought I'd stopped that from happening with this line, but maybe we should whitelistthe base REPL modes instead.

@aviatesk
Copy link
Member

Ah I see. Not sure why isdebugging filtering doesn't work for me.

@aviatesk
Copy link
Member

Sorry @pfitzseb, I cluttered with branches and just found I've not included 0614e71 -- will try this again and if the error doesn't happen I guess we can move to release 👍

@aviatesk
Copy link
Member

Okay, so I found I only see the error when I start debugging within tree-view (which I added in JunoLab/atom-julia-client#684)
Will try to look at why that causes a problem, but I think you can merge for now if you want.

@pfitzseb pfitzseb merged commit 580e2c8 into master Feb 16, 2020
@aminya
Copy link
Contributor

aminya commented Feb 16, 2020

Yay. 🚀

@aviatesk aviatesk deleted the sp/debugfile branch February 16, 2020 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants