Skip to content

Printing something in Debug Console should print it when no terminal is created to see the output (since running a test in debug mode from right clicking in the margin). #947

@guillaume-chevalier

Description

@guillaume-chevalier

Environment data

  • debugpy version: 1.6.0
  • OS and version: Mac OS Monterey 12.3.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9
  • Using VS Code or Visual Studio: VS Code

Actual behavior

Printing something in Debug Console should print it when no terminal is created to see the output.

Expected behavior

Debug console doesn't print anything. The process cannot be found in the other terminal tab because it is started from a right click on a test and then clicking debug in the code's margin.

Steps to reproduce:

  1. Right-click on a test and then click debug in the code's margin.
  2. Observe that there is no terminal process that were started in the Terminal vs code tab, since the process was started using the testing instead of as a regular run configuration.
  3. print("something \n that \n spans \n a \n few \n lines.") in the debug console doesn't output anything. To see proper newlines I need to split it on newlines "something \n that \n spans \n a \n few \n lines.".split(\n) and these prints are annoying. Visual acuity is reduced a lot here.

Related: https://stackoverflow.com/questions/71811731/how-do-you-get-vs-code-to-write-debug-stdout-to-the-debug-console

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions