Skip to content

Commit d9240f3

Browse files
committed
Improve debug configuration creation instructions
See inline comment for details.
1 parent f317146 commit d9240f3

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

programming/editors/vscode.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,23 @@ Command Prompt (and not the terminal within VSCode or PowerShell).
9999
Next, we are going to create a [debug configuration][debug-config] so that
100100
VSCode knows what you want it to debug.
101101

102+
<!--
103+
If the user hasn't activated their Python extension in the current editor
104+
session then it won't yet have registered itself. Additionally if the currently
105+
focused file is not a Python file then they will be asked for the environment
106+
they want to debug. Avoid both of these by instructing the user to open their
107+
`robot.py` before attempting to configure debugging.
108+
-->
109+
102110
1. Open the workspace containing your code.
103-
2. Select the Run view in the sidebar (or press
111+
2. Open your `robot.py` file.
112+
3. Select the Run view in the sidebar (or press
104113
<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd> /
105114
<kbd>⌘</kbd> + <kbd>⇧</kbd> + <kbd>D</kbd> on macOS)
106-
3. Click "create a launch.json file".
107-
4. In the menu which appears, select **Remote Attach**
108-
5. Leave the subsequent values at their defaults (press <kbd>Enter</kbd> twice)
115+
4. Click "create a launch.json file".
116+
5. In the menu which appears, if you are asked to select an environment select **Python**.
117+
6. When asked for a Debug Configuration, select **Remote Attach**.
118+
7. Leave the subsequent values at their defaults (press <kbd>Enter</kbd> twice).
109119

110120
This will create a new file in your project which contains the configuration.
111121

0 commit comments

Comments
 (0)