-
Notifications
You must be signed in to change notification settings - Fork 497
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
Startup script for temporary interactive console debug sessions #1168
Comments
After speaking with |
There is already a startup script That said, I do think it would be nice to have a workspace specific startup script or maybe even a For a temp integrated console, perhaps a workspace profile could access variables to let you know which debug launch config is currently active. This is where I dither a bit. Is it easier to have a single workspace profile that could tell the diff between lang/debug sessions and know which debug config (name?) is active and then put all your logic in there to handle different debug scenarios. Or is it easy to have a property on the debug launch config where you specify a path to various startup scripts. |
I believe he's talking mostly about temporary interactive debugging sessions which is where an init script would be the most helpful.
That was my thought. I can see that potentially being useful for all debug configuration types, but in particular temp interactive sessions. Assuming that's a reasonably easy property to add, I think that's the best way to go. About workspace profiles, I really like the idea of them for preparing intellisense/loading editor commands from #190. I think mixing debugging into that, or having a separate profile for it might be confusing. |
Well for the vast majority of folks that will not discover the temp int console setting, such a profile would mix with debugging. Maybe that setting should be a setting on the launch configuration instead - at least for configs like launch script, current file and current file w/args. We also really, really need to fix the behavior that the temp console closes immediately after the script finishes. |
@rkeithhill, @SeeminglyScience: I totally neglected to mention I was talking about the temporary interactive console - whoops! I'm editing the issue text now.
This is what I think would be the easiest from a usability perspective - that, or re-use the current |
I would also love to see this happen. Using the |
@SydneyhSmith this should probably be reclassified to an enhancement. |
Now it seems that the temporary integrated console does not close after the I'm using [email protected]. |
Indeed, the console does not close, but the debugger stops, so it is not possible to debug when the I was able to find a workaround by modifying a line of code in |
System Details
$PSVersionTable
:Issue Description
As it stands, debugging a module in VSCode is still a bit clunky. Debug configurations allow for generating a temporary integrated console for every debug session, but using this option requires manually importing the module every debug session.
There is also the option of running a script via the
script
attribute in a debug configuration entry, which could potentially be used to run environment setup (module import, etc.) - however, the integrated console closes once the script completes. It would be helpful if there was a way to specify a startup script for temporary consoles in a debug configuration, so module imports and whatnot could be done automatically.The text was updated successfully, but these errors were encountered: