First of all, thanks to Keno!
Installation & Usage (from GitHub repository)
Install IntelliJ IDEA (or other JetBrains IntelliJ platform IDEs such as PyCharm / WebStorm / GoLand / and even Android Studio :joy:).
Setup Julia in IntelliJ
- Julia 0.7+
#73711a4 and #78d649e followed is required when
(v1.0) pkg> add ASTInterpreter2#73711a4 (v1.0) pkg> add DebuggerFramework#78d649e (v1.0) pkg> add JSON
Create a Julia project with the plugin, and write simple example codes:
function func() i = 10 while i>0 println(sin(i)) i-=2 end end @enter func()
@enter macro before a function call expression as
And put a breakpoint at any line (which is useless right now but necessary for the debugger).
The work is done by the
@enter macro, not breakpoints.
then you’ll notice that the
Debug button at upper right corner is enabled, which is shown as a green bug. Press it!
If you use this debugger under Windows, the first time you run the debugger may froze your IDE about 2 minutes tested on my PC, while it’ll become faster afterwards. So we strongly recommend not to use this debugger under Windows.
Relayout your debug panel like this by dragging:
You can see call stackframes at the left of panel and local variables at right.
|Step Over||Run next call in current file. The
|Step Into||Run the next call into a deeper stackframes. The
|Froce Step Into||(maybe useless).
|Step Out||Run out of current stackframes.
|Rerun||Rerun the Julia program and debug.|
|Resume ▍▶||Rerun the debug when debug session is not terminated. (Note that debug session will not exit until you press the Red Stop Rectangle Button)|