From 8929cbb5bbcbd0ecdbe385faa94401102acb9a95 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Sat, 13 Jul 2019 21:52:58 -0700 Subject: [PATCH] Minor update to TROUBLESHOOTING.md --- TROUBLESHOOTING.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 853e1b9d..60c03bab 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -10,11 +10,13 @@ There are a few known issues in the current version of the debugger: ### 1. Multiprocessing on Linux/Mac Multiprocess debugging on a Linux machine requires the `spawn` setting. We are working on improving this experience, see [#943](https://github.com/Microsoft/ptvsd/issues/943). Meanwhile do this to improve your debugging experience: ```py -import multiprocessing -multiprocessing.set_start_method('spawn', True) +if __name__ == '__main__': + import multiprocessing + multiprocessing.set_start_method('spawn', True) ``` Note: On Windows, the `multiprocessing` package uses "spawn" as the default and only option, so it is recommended for cross-platform code to ensure uniform behavior. If you choose to use `spawn` you may have to structure your `__main__` module like this https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods. + ### 2. Breakpoints not set If you receive an error saying **breakpoint not set**, then look at your path mappings in `launch.json`. See Meta-Issue [#2976](https://github.com/Microsoft/vscode-python/issues/2976) for more details.