Python debuger console didnt start with shell Integration


but when i debug the .py , bash didnt started with “–init-file /root/.cursor-server/bin/linux-x64/3e548838cf824b70851dd3ef27d0c6aae371b3f0/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh”

vscode doesnt have this problem.
could you help me to solve?

Hey @JianxiangL , thanks for the detailed write-up and screenshots.

Quick context on what’s happening: Cursor (like VS Code) only injects the `–init-file …/shellIntegration-bash.sh` flag for “regular” integrated terminals. Terminals spawned by the debugger are marked as feature terminals, so shell integration is skipped unless the debug adapter explicitly opts in. For Python, that opt-in lives in the Python extension, not in Cursor itself, which is why this looks like a difference between Cursor and VS Code even though the underlying logic is the same.

A few things to try, in order:

1. In settings, make sure both of these are enabled:

- `terminal.integrated.shellIntegration.enabled` (set to `true`)

- `python.terminal.shellIntegration.enabled` (set to `true`)

Set them in the Remote scope as well, since you’re on Remote-SSH.

2. Check your Python extension version on the remote. From the Extensions panel, click the gear on Python and pick “Install Specific Version”, then compare it with what your VS Code has. The shell integration behavior changed across recent ms-python releases. Updating to the latest usually fixes this.

3. In your `launch.json`, confirm the configuration uses:

“console”: “integratedTerminal”

The `internalConsole` console (the Debug Console pane) is not a real terminal and will never show the `–init-file` flag.

4. Reload the window after changing any of the above so the remote extension host picks up the new settings.