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

Auto-attach to sub process (auto-reload of Django, Flask) #425

Closed
DonJayamanne opened this issue May 21, 2018 · 6 comments
Closed

Auto-attach to sub process (auto-reload of Django, Flask) #425

DonJayamanne opened this issue May 21, 2018 · 6 comments
Assignees

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented May 21, 2018

pydevd supports this today, all we need to do is just pass a flag.

@DonJayamanne DonJayamanne added this to the June 2018.2 milestone May 21, 2018
@DonJayamanne
Copy link
Contributor Author

@karthiknadig Please check whether this is required for VS

@zooba
Copy link
Member

zooba commented May 21, 2018

Isn't this the same as #57?

@karthiknadig
Copy link
Member

karthiknadig commented May 21, 2018

The important distinction is the number of process that the adapter itself is attached to. I think in this case there will be one process that the adapter is expected to attach to or launch, and continue to be connected, even after template reload results in a new sub-process. Although I am not sure how the template breakpoints will work in this case, we have to test this to see if there are any other limitations.

@DonJayamanne
Copy link
Contributor Author

I've created a separate issue for django, flask debugging due to an item added into the exit criteria of PTVSD. I do not want multi-process debugging not to get implemented simply because the VSC protocol doesn't support it. I.e. not being able to differentiate between the process ids when debugging (step in, step out, what process ids do threads belong to, etc).

In the case of auto-reloading of django templates, we (VSC) don't care whether its mult-process or not. All we care about is breaking into the code and supporting breakpoints (i.e. standard debugging). I.e. process id doesn't matter.

@MikhailArkhipov MikhailArkhipov modified the milestones: June 2018.2, Future Jun 20, 2018
@karthiknadig
Copy link
Member

User feedback:

I used to use Pyramid, and the VSC debugger doesn't handle the option "--reload" (provided by Pyramid) and the multi-threaded process, then the breakpoints don't work.
I have a warning from pydev debugger :
pydev debugger: New process is launching (breakpoints won't work in the new process).
pydev debugger: To debug that process please enable 'Attach to subprocess automatically while debugging?' option in the debugger settings.

Anyway, the breakpoint work without the --reload option, but I need to restart the server at any changes in the code

@int19h
Copy link
Contributor

int19h commented Jan 18, 2020

This is implemented in insider builds now. We have another more generic epic, #1706, open to track the overall multiproc work - this has the information on how to enable it. We'll use that one to track the release progress (i.e. it will be closed once we ship a stable version with the new bits).

@int19h int19h closed this as completed Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants