From ae2f05b1900a0ac66a264b72e3ee4d8ffbfa65a7 Mon Sep 17 00:00:00 2001 From: Ben Arthur Date: Fri, 22 Mar 2024 09:24:38 -0500 Subject: [PATCH 1/2] Update README.md document @timholy 's suggested way to speed up debugging: https://discourse.julialang.org/t/debugging-extremely-slow/53801/38 --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ed4a086..b0121ef 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,23 @@ Currently, there are cases where the interpreter is too slow for this to be feas A workaround is to use "compiled mode" which is toggled by pressing `C` in the debug REPL mode (note the change of prompt color). When using compiled mode, code that is stepped over will be executed by the normal julia compiler and run just as fast as normally. -The drawback is of course that breakpoints in code that is stepped over are missed. +The drawback is that breakpoints in compiled code that is stepped over are missed. + +To split the difference between these two extremes, one can fine tune which modules are compiled and which are not. +For example, to compile all code in Base, even when not in `C` mode, and hence break on all specified points in user code, +issue the following commands on the REPL *before* `@enter`: + +```jl +using JuliaInterpreter, MethodAnalysis +union!(JuliaInterpreter.compiled_modules, Base) +union!(JuliaInterpreter.compiled_modules, child_modules(Base)) +``` + +Additional imported modules can also always be compiled with: + +```jl +union!(JuliaInterpreter.compiled_modules, SomePackage) +``` ### Syntax highlighting From 5325a93506bfe31000df599b34ccd83701baa815 Mon Sep 17 00:00:00 2001 From: Ben Arthur Date: Fri, 22 Mar 2024 09:31:28 -0500 Subject: [PATCH 2/2] doc compiled_modules --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index b0121ef..b2587bf 100644 --- a/README.md +++ b/README.md @@ -225,7 +225,6 @@ issue the following commands on the REPL *before* `@enter`: ```jl using JuliaInterpreter, MethodAnalysis -union!(JuliaInterpreter.compiled_modules, Base) union!(JuliaInterpreter.compiled_modules, child_modules(Base)) ```