posit-dev / posit-dev/positron

Feature Request: Debugging python tests should make use of the "nice" console (not the debug console) and should make use of the session in the side bar.

Open
#11,073 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: debugger lang: python support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 9h
Merged PRs (30d)
195

Description

Originally started as a discussion, subsequently advised to open an issue.

When debugging a test, I would like to use all the nice things I like about positron. Specifically, I would like to use the nice console instead of the debug console that comes with vanilla vscode. I would also like my variables and objects etc to be populated in the session screen.
Essentially I want the nice interactive experience when running tests.
As far as I know, the only way I can achieve this right now is to put together a specific debugging script that does all the stuff (importing packages, instantiating fixtures etc) leading up to the test code.
It would be much nicer to be able to right click on a test and debug it, then have it break at some location I set, and have all the nice interactive positron capabilities available to me.

I don't mind if the code "pauses" at the breakpoint/exception, or if positron simply converts the state at that point into an active python session. Either would be super convenient.

This issue seems to have a little overlap with https://github.com/posit-dev/positron/issues/5659

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked discussion #11049 and overlapping issue #5659, then reproduce right-click debugging for a Python test in Positron. Compare the debug console and session behavior at a breakpoint; done means the test can be debugged while retaining the requested interactive console and session experience.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, typescript, vscode
Domain
developer-experience, testing, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.