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

Stepping over fails in debugger with message Unable to open '<string>' FIle not found #1071

Closed
DonJayamanne opened this issue Dec 13, 2018 · 3 comments

Comments

@DonJayamanne
Copy link
Contributor

@malmaud commented on Wed Nov 21 2018

Getting this error when debugging this file:

import typing
from dataclasses import dataclass, field


@dataclass
class Thing:
    a: typing.Any
    b: typing.Any
    c: typing.Any = field(init=False, repr=False)

    def __post_init__(self):
        self.c = self.a + self.b


Thing(a=1, b=2)

If I set a breakpoint at the self.c = line and then click 'step over', I see

Unable to open '<string>': File not found (file:///Users/malmaud/Dropbox (MIT)/Desktop/fun/<string>).

I guess this is related to microsoft/vscode-python#3063.

VSCode 1.29.1
Python 3.6.7 with dataclasses package installed via pip install dataclasses
Extension 2018.10.1

Screenshot:
screen shot 2018-11-21 at 11 45 30 am


@DonJayamanne commented on Wed Nov 21 2018

What's the name of the file you are debugging


@malmaud commented on Wed Nov 21 2018

/Users/malmaud/Dropbox (MIT)/Desktop/fun/debug.py

@DonJayamanne DonJayamanne changed the title Unable to open '<string>' FIle not found Stepping over fails in debugger with message Unable to open '<string>' FIle not found Dec 13, 2018
@karolzlot
Copy link

karolzlot commented Dec 16, 2018

I have similar message box:

2018-12-16 1

i made some investigation:

python debugger bug

it seems to appear at random line where word 'mutagen' is

@jarlva
Copy link

jarlva commented Dec 21, 2018

Having similar issue and is also random.
Since debugging is done on a remote server and since the issue is random and only when taking the time to step in/out, it seems clear that the issue is on the remote server.

On that note - is there a way to change that to debug 100% locally?

@karthiknadig
Copy link
Member

This is fixed. In cases such as dataclass, step-over should work. For step-in/out cases we currently show a temp file with message saying that we couldn't retrieve sources. IDE should not show File Not Found for those cases.

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

6 participants