Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Program should be started in response to the launch request (not configurationDone) #146

Closed
DonJayamanne opened this issue Feb 28, 2018 · 2 comments

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Feb 28, 2018

The launch request is supposed to be the place where the code is supposed to be started.
Currently we're running the code in the on_configurationDone method (by sending the command CMD_RUN to pydevd).

I'd like this changed so we can configure the debugger using the arguments in the launch request.
E.g. enabling of redirection of stdout and stderr (this needs to be done before the code is started).

Simple change, work as expected in VSC, I believe it should work in VS as well.

This change is necessary for #60 and #131

@DonJayamanne DonJayamanne changed the title Send CMD_RUN command from the on_launch method Program should be started in response to the launch request (not configurationDone) Feb 28, 2018
@int19h
Copy link
Contributor

int19h commented Feb 28, 2018

Is it guaranteed that launch (or attach) is the last thing that happens before configurationDone? Otherwise we might launch before we know all the necessary options. My understanding is that it's the whole point of having configurationDone, pretty much - to have a well-defined sequence of events framing debugger startup.

We don't necessarily need to do this to make debugger configurable. We'll just need the launch handler to stash away the debugger options that it receives, and then configurationDone can use them to launch accordingly.

@DonJayamanne
Copy link
Contributor Author

whole point of having configurationDone, pretty much - to have a well-defined sequence of events

Yes, you're right.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants