Skip to content

Debugging opens new all-lowercase file #5049

Closed

Description

@whubbla

Issue Type: Bug

When I open a .py file, and set a breakpoint of StopOnEntry=True in launch.json, and start debugging, as soon as a breakpoint or initial stop is hit (or there's a runtime error), another tab opens with an all-lowercase version of the filename (it previously was a mix of lower and upper-case).

So, I then have two tabs, MyScript.py and myscript.py. The debugger is active in myscript.py, even though I started it from MyScript.py.

I hover over the original one (MyScript.py), and it says something like (capitalization pattern reproduced here): "Q:\Myname\GitHub\FolderPath\SubPath123\Othername\MyScript.py"

If I hover over the all-lowercase file, it shows this:
"Q:\Myname\GitHub\folderpath\subpath123\Othername\myscript.py"

So, it changes the case in folderpath and subpath123 and myscript, but not in Othername.

It still saves to the proper filename, but it gets confusing in the code editor.

I'm using "Python: Current File (Integrated Terminal)" and it looks like this:

"version": "0.2.0",
"configurations": [
    {
        "name": "Python: Current File (Integrated Terminal)",
        "type": "python",
        "request": "launch",
        "program": "${file}",
        "stopOnEntry": true,
        "console": "integratedTerminal"
    },

Extension version: 2019.3.6215
VS Code version: Code 1.32.3 (a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz (8 x 2500)
GPU Status 2d_canvas: disabled_software
checker_imaging: disabled_off
flash_3d: disabled_software
flash_stage3d: disabled_software
flash_stage3d_baseline: disabled_software
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
surface_synchronization: disabled_off
video_decode: disabled_software
webgl: disabled_off
webgl2: disabled_off
Memory (System) 31.65GB (24.55GB free)
Process Argv
Screen Reader no
VM 0%

Activity

  1. ghost added
    triage-neededNeeds assignment to the proper sub-team
    on Apr 1, 2019
  2. fr43nk commented on Apr 2, 2019

    @fr43nk

    Can confirm this behavior. Set a breakpoint in the python file. When debugging, the file is reopened with a lower case name. This is no problem as long as the open tab is not static (i.e. edited the file) so the tab can be replaced with the "new" file with the name all in lower case.

    VSCode: 1.32.3
    Python extension: 2019.3.6215 (28 March 2019)
    OS: Win7

  3. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Apr 2, 2019
  4. DonJayamanne commented on Apr 4, 2019

    @DonJayamanne

    Please could you do the following:

    • Open VS Code
    • Select the command Extensions: Open Extensions Folder
    • Locate the Python extension directory, typically of the form ms-python.python-2019.3.****
    • In that directory ensure you do not have any debug*.log files, if you do, please delete them
    • Go back into VS Code and modify your launch.json to add the setting "logToFile": true, see below:
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File (Integrated Terminal)",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "stopOnEntry": true,
            "console": "integratedTerminal",
            "logToFile": true
        },
    • Start debugging
    • When done (when you get the duplicate window opened), then
      • Go back into the extension directory
      • Upload the file debug*.log into this GitHub issue
  5. whubbla commented on Apr 4, 2019

    @whubbla
    Author

    Here you go. I tried to replicate the issue with more generic folder names (it replicated in the sense that the debugger opened another tab and messed with the capitalization in the file path, but the .py file itself didn't have its capitalization affected). So, this is the log from the original issue.
    debug15860.log

  6. adamscarlat commented on Apr 24, 2019

    @adamscarlat

    Any updates on this issue?

  7. schperplata commented on Apr 24, 2019

    @schperplata

    I am also very eager for this fix. We are using VS Code company-wide, and this issue makes debugging really inconvenient. Hope you manage to solve it soon. :)

  8. DonJayamanne commented on Apr 24, 2019

    @DonJayamanne

    Please could you test this at your end, we added a few fixes related to this in the latest release.
    Note: Please update to the latest version of the python extension.

  9. schperplata commented on Apr 24, 2019

    @schperplata

    Seems like file name CaSE is now not an issue anymore. A quick check didn't open any unwanted all-lower-case files.

    However, upon extension update, I had to re-install extension (it was actully removed from my installation - very strange behaviour).
    Than, after reinstallation, this message is displayed in integrated terminal before debug session (before normally working debug session):

    cd 'd:\Stromarija\GIT\VS_Code_STM32_IDE\example\STM32F051K4\ideScripts\updateBuildData.py'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Python3.7_64x\python.exe' 'c:\Users\domen\.vscode\extensions\ms-python.python-2019.4.11987\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '61510' 'd:\Stromarija\GIT\VS_Code_STM32_IDE\example\STM32F051K4\ideScripts\updateBuildData.py'
    cd : Cannot find path 'd:\Stromarija\GIT\VS_Code_STM32_IDE\example\STM32F051K4\ideScripts\updateBuildData.py' because it 
    does not exist.
    At line:1 char:1
    + cd 'd:\Stromarija\GIT\VS_Code_STM32_IDE\example\STM32F051K4\ideScript ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (d:\Stromarija\G...ateBuildData.py:String) [Set-Location], ItemNotFoundExcept 
       ion
        + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand
    
  10. whubbla commented on Apr 24, 2019

    @whubbla
    Author

    Don Jayamanne (@DonJayamanne) - I tested after updating to the latest release, and the problem is resolved for me. I did not encounter any of the issues mentioned by Domen Jurkovic (@schperplata) .

  11. ghost removed
    info-neededIssue requires more information from poster
    on Apr 25, 2019
  12. ghost removed on Apr 25, 2019
  13. adamscarlat commented on Apr 25, 2019

    @adamscarlat

    I updated the extension and the issue got resolved for me. Thank you so much!

  14. PescheHelfer commented on Apr 25, 2019

    @PescheHelfer

    The problem is gone for me, as well. Thanks a lot!

  15. locked as resolved and limited conversation to collaborators on May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable bugregressionBug didn't exist in a previous release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions