Debugging on OSX with iTerm as external terminal creates a new window each time
See original GitHub issueIssue Type: Bug
I don’t know whether this should count as a bug report or a feature request, but since the behaviour differs between Terminal and iTerm I’ve filed it as a bug.
To reproduce, simply start a debugging session using the following settings:
- settings.json
"terminal.explorerKind": "external",
"terminal.external.osxExec": "iTerm.app",
- launch.json
"console":"externalTerminal",
This will send the command to start the debugging server and execute the program to iTerm, but it will create a new window and session each time, regardless of whether there are any existing windows open, including windows created from previous debugging sessions.
The expected behavior is to use the same terminal session when debugging the same program multiple times. This is also in line with how Terminal behaves when it is used as the external terminal, as successive debugging attempts will use the same window/session as previous runs.
VS Code version: Code 1.62.2 (3a6960b964327f0e3882ce18fcebd07ed191b316, 2021-11-11T20:59:05.913Z) OS version: Darwin x64 19.6.0 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i5-7360U CPU @ 2.30GHz (4 x 2300) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled webgl: enabled webgl2: enabled |
Load (avg) | 8, 6, 5 |
Memory (System) | 16.00GB (0.10GB free) |
Process Argv | –crash-reporter-id e272faef-ec57-439e-960e-46857511d6ef |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top GitHub Comments
So I read about the Python API and I don’t think it will be any better.
First of all , to use Python API it you are required to enable this option in iTerm settings.
Moreover, according to this example of launching iTerm2, the script is required having Python +
iterm2
andpyobjc
packages.I’m thinking that implementing @willdhorn AppleScript with a warning that recommends enable iTerm’s shell integration that will be shown first on the new opened session will be fine. I will also be happy to help implementing and testing it 😃 (I have Apple Silicon).
Starting with Monterey there is no longer Python installed on macOS. But feel free to submit a PR for this feature 😉