-
Notifications
You must be signed in to change notification settings - Fork 159
Step Over, Step Into, not working when debugging Subprocesses #1876
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
Comments
Can you share your application? This works fine for me with the latest bits. DebugStepMultiproc.mp4I used this code here: import subprocess
import sys
import time
def act_busy():
# Simulate a busy operation
print("Subprocess is busy doing something...")
for i in range(500):
print(f"Working... {i + 1}/5")
sys.stdout.flush() # Ensure the output is flushed immediately
time.sleep(1) # Simulate work with a sleep
print("Subprocess finished working.")
def run_subprocess():
# Define the command to run as a subprocess
command = ['python', __file__, 'act_busy']
try:
# Run the subprocess and wait for it to complete
result = subprocess.run(command, capture_output=True, text=True, check=True)
# Print the output of the subprocess
print(result.stdout)
# Print success message
print("Subprocess completed successfully.")
except subprocess.CalledProcessError as e:
# Print error message if the subprocess fails
print(f"Subprocess failed with error: {e}")
if __name__ == "__main__":
if len(sys.argv) > 1:
act_busy()
else:
run_subprocess() |
This issue was closed because it has been stalled for 30 days with no activity. If the issue still persists, please reopen with the information requested. Thanks. |
Seems to work fine for me. Although I'm on windows. DebugMultiproc.mp4 |
I can reproduce on Linux though. |
Strange but the subprocess example works fine on Linux. Not sure how multiprocess could affect stepping. |
When debugging a process in python, the program halts on breakpoints yet only the Continue button works. Pressing Step Over or Step into just Continues to the next breakpoint.
I have tried many launch.json configs and the only thing that resolved my issue was downgrading to v2024.10.0.
here is my config just in case:
The text was updated successfully, but these errors were encountered: