Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Add support for remote source references #318

Closed
DonJayamanne opened this issue Apr 6, 2018 · 4 comments
Closed

Add support for remote source references #318

DonJayamanne opened this issue Apr 6, 2018 · 4 comments
Assignees

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Apr 6, 2018

Adds support for sourceReference

Scenarios:

  1. Debugging std libs or similar
  2. Debug a remote application without any source on the client side (all we need is, is one of, breakpoint(), ptvsd.wait_for_attach or ptvsd.break_into_debugger or an exception).

I'd consider item 2 to be a great feature for release (I'm assuming this isn't already possible in PTVS, I know it isn't in VSC Python).

When does this come into play:
Only when remote debugging (attach) and if ptvsd is unable to map the server file to a client file (i.e. PTVSD is unable to map the file)

Status

  • I've got this working, just need to test on Windows, Linux and a docker container
  • Seems to work without any source
  • Breakpoints/pause/breaking into exceptions (works)

Items to consider/check:

  • UX (latency) when debugging large files

@karthiknadig @int19h
Any thoughts/suggestions?

@int19h
Copy link
Contributor

int19h commented Apr 6, 2018

This wasn't a supported scenario for the old debugger in VS either, but it was always on the wish list. It certainly simplifies things quite a bit in exception debugging scenarios (which is pretty common for remote), since you don't need any local sources at all to attach and break on exception. We still need path mapping for breakpoints set in advance, so this can't fully replace that, but it's very useful even so.

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Apr 6, 2018

We still need path mapping for breakpoints set in advance

From what I can tell it works (provided the path mappings have been provided , i.e. #241 fixes that).
Tested this a while ago, and works beautifully in VSC.

@int19h
Copy link
Contributor

int19h commented Apr 6, 2018

What I meant is that you need a local source file that you can open and set a breakpoint inside, before you even attach (if you want to attach and hit a breakpoint, as opposed to attaching and breaking on exception). And I'd expect that in the scenario with mapping, it would just find that local file, instead of requesting the source remotely.

@DonJayamanne
Copy link
Contributor Author

What I meant is that you need a local source file that you can open and set a breakpoint inside

Yes this would work, using what was implemented in #241

it would just find that local file, instead of requesting the source remotely.

Yes

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants