-
Notifications
You must be signed in to change notification settings - Fork 189
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
Feature?: Only Interpret Required Files & Modules With Breakpoints #615
Comments
On larger projects, the overhead of interpreting all the modules in the project (including all dependencies) causes an unbearable slowdown. This commit makes it possible to disable the auto interpreting of modules and instead rely on files that are in `requireFiles` (which are interpreted) Fixes elixir-lsp#615
@jeremyjh 👋 Thanks for the feature request! Indeed that does make sense. Since modules that are found in Here's an example launch configuration: Note: Any modules that don't have a breakpoint and are not in However I think with some more work and effort we could support stepping into arbitrary modules while debugging by analyzing what modules are referenced from the module that we are currently in. |
@axelson Wow, thanks for the quick response! I tried this out and the new flag definitely works in terms of not automatically interpreting everything; now debug tasks can run very fast. However I was not successful in adding a module of my program to
I'm just adding it like this: "requireFiles": [
"test/**/test_helper.exs",
"lib/project/module_name.ex",
"${relativeFile}"
] |
I think this would also need to be guarded by a flag as well as I think its possible that instrumenting every possible call graph from a module could lead to significant slow-downs. It would be really nice though if we could at least auto-instrument every module that has a breakpoint in it; for most of my uses that would be all I need. |
Ah, I see. Yes that is easy to reproduce. Thinking about this some more we probably shouldn't go through So I have added a
This would interpret all the modules in your application. Of course you use a more restrictive pattern if you only wanted to interpret some of the modules. Can you pull the code and try again? |
@axelson Brilliant! This is a much more flexible design, I really like it. It works great for me. |
* Debugger: Allow disabling auto interpreting On larger projects, the overhead of interpreting all the modules in the project (including all dependencies) causes an unbearable slowdown. This commit makes it possible to disable the auto interpreting of modules and instead rely on files that are in `requireFiles` (which are interpreted) Fixes #615 * Add interpretModulesPatterns * Fix formatting * Update variable naming * Add try catch when interpretting by pattern Also improve some naming * Fix error * Fix formatting
I assume this is a feature request, as I don't see a documented way to do it although that is a bit surprising to me. I do not want all my modules and especially all my dependencies to be interpreted modules in the debugger. Instead, I would like to interpret only modules/files I have specified in
requiredFiles
. Ideally any file with a breakpoint would also be automatically interpreted.I'd like to use the debugger with VS Code in my project but I can't because it takes 5+ minutes to run a single test with everything interpreted. The same test will run in less than a second in a normal process.
If it is a feature, I'm willing to work on it unless there is some reason this is not a good idea or not practical.
The text was updated successfully, but these errors were encountered: