Skip to content

Commit 901bc95

Browse files
debugger-launchjson.md: console related suggestions from recent issues
This rewrites the "console" documentation to hopefully be more clear. It also incorporates the suggestion to use `"internalConsoleOptions": "neverOpen"` with integratedTerminal that @BlinkSun made. This also adds a note to the browser launch documentation that @achandlerwhite suggested.
1 parent 9ed9c15 commit 901bc95

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

debugger-launchjson.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ The launch browser field can be optionally added if you need to launch with a we
4343
If there are web server dependencies in your project.json, the auto generated launch file will add launch
4444
browser for you. It will open with the default program to handle URLs.
4545

46+
Note that `launchBrowser` requires `"console": "internalConsole"`, as the browser launcher scrapes the standard output of the target process to know when the web server has initialized itself.
47+
4648
## Environment variables
4749
Environment variables may be passed to your program using this schema:
4850

@@ -68,13 +70,14 @@ Example Properties/launchSettings.json file:
6870
```
6971

7072
## Console (terminal) window
71-
By default, processes are launched with their console output (stdout/stderr) going to the VS Code Debugger Console. This is useful for executables that take their input from the network, files, etc. But this does NOT work for applications that want to read from the console (ex: `Console.ReadLine`). For these applications, use a setting such as the following:
7273

73-
"console": "integratedTerminal"
74+
The `"console"` setting controls what console (terminal) window the target app is launched into. It can be set to any of these values --
75+
76+
`"internalConsole"` (default) : the target process's console output (stdout/stderr) goes to the VS Code Debug Console. This is useful for executables that take their input from the network, files, etc. But this does **NOT** work for applications that want to read from the console (ex: `Console.ReadLine`).
7477

75-
When this is set to `integratedTerminal` the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application.
78+
`"integratedTerminal"` : the target process will run inside [VS Code's integrated terminal](https://code.visualstudio.com/docs/editor/integrated-terminal). Click the 'Terminal' tab in the tab group beneath the editor to interact with your application. Alternatively add `"internalConsoleOptions": "neverOpen"` to make it so that the default foreground tab is the terminal tab.
7679

77-
When this is set to `externalTerminal` the target process will run in a separate terminal.
80+
`"externalTerminal"`: the target process will run inside its own external terminal.
7881

7982
## Source File Map
8083
You can optionally configure a file by file mapping by providing map following this schema:

0 commit comments

Comments
 (0)