You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sys.exit(0) does not break by default, but sys.exit() does #489
The behavior of debugpy is not in compliance with the specifications. Because the underlying issue is broader, I raised a separate ticket on the matter, which explains the problem and suggests a solution that should not only fix the issue you are having, but other issues as well. Unforatunately, it was closed and moved to a discussion. Please contribute, if you wish to see it fixed.
Activity
karthiknadig commentedon Dec 8, 2020
In the launch JSON, add this and see if it helps:
nedsociety commentedon Dec 8, 2020
Well it makes
sys.exit(0)also breaks as well, which is even more undesirable. The expected behavior in default should be:sys.exit()doesn't break (but currently breaks)sys.exit(0)doesn't breaksys.exit(n)for nonzeronbreakskarthiknadig commentedon Dec 8, 2020
Ah! I see. Sorry, I misunderstood the issue.
fabioz commentedon Dec 10, 2020
It seems that the issue is that
SystemExit.codeisNonein this case (and not0).Properly handle sys.exit() as sys.exit(0). Fixes microsoft#489
Properly handle sys.exit() as sys.exit(0). Fixes microsoft#489
danielniccoli commentedon May 31, 2024
Fabio Zadrozny (@fabioz) Karthik Nadig (@karthiknadig) Myungbae Son (@nedsociety)
The behavior of debugpy is not in compliance with the specifications. Because the underlying issue is broader, I raised a separate ticket on the matter, which explains the problem and suggests a solution that should not only fix the issue you are having, but other issues as well. Unforatunately, it was closed and moved to a discussion. Please contribute, if you wish to see it fixed.
The issue: #1590
The discussion: #1591