Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disables ability to add template.html breakpoints in VSCODE #48

Open
aviyadeveloper opened this issue May 12, 2020 · 2 comments
Open

Disables ability to add template.html breakpoints in VSCODE #48

aviyadeveloper opened this issue May 12, 2020 · 2 comments

Comments

@aviyadeveloper
Copy link

When the extension is enabled, the ability to add breakpoints in django html templates is lost for VSCODE.

This is unfortunate as clearly the two functionalities together - django template syntax highlighting and debugging - would fit so well together.

@WayneLambert
Copy link

Yep, just come across this one myself. The workaround is to change the file association/language mode of the file temporarily to ordinary HTML and then change it back to Django HTML once finished debugging. It would be great to keep the native debugging functionality with the file remaining as a Django HTML template for the syntax highlighting and debugging together.

The issue might be on the VS Code side though, so it would be worth pointing this out to that team in case they can add this file association as an acceptable file within its code.

@naro
Copy link

naro commented Nov 23, 2022

Not sure if there were any changes related to this but I have just tried to debug the Django template for the first time and it works even if the file type is Django HTML

Django extension version v1.10.0
VSCode 1.73.1

I'm running Django in docker and attaching to it using debugpy with the following launch.json

    "version": "0.2.0",
    "configurations": [
        {
            "name": "Project debug",
            "type": "python",
            "request": "attach",
            "pathMappings": [
                {
                    "localRoot": "${workspaceFolder}/project",  // location in development tree
                    "remoteRoot": "/src/project/project/"  // location in docker container
                }
            ],
            "port": 3000,
            "host": "localhost",
            "django": true
        }
    ]
}

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

No branches or pull requests

3 participants