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

TPI: Improve debug config selection in Django #279

Closed
3 tasks done
paulacamargo25 opened this issue Mar 24, 2024 · 1 comment
Closed
3 tasks done

TPI: Improve debug config selection in Django #279

paulacamargo25 opened this issue Mar 24, 2024 · 1 comment

Comments

@paulacamargo25
Copy link
Contributor

paulacamargo25 commented Mar 24, 2024

Refs: #161

Complexity: 3

Create Issue


Automatically detect a Django file, and show it.

Steps

  1. Open a Django Project if you already have one or you can also create one following the steps in the Django Tutorial.
  2. Head over to the Run And Debug tab, and click on create a launch.json file.
Screenshot 2024-03-24 at 11 31 32 AM
  1. A window will open with a list of options, choose Python Debugger > Django.

Verification

  1. Valid django file
    1. Verifies that your manage.py file was found correctly and is displayed in the list.
    2. When you hover the item, verify that there is a button to open the file and that it works correctly.
    3. Select this option and verify that a launch.json configuration is created with the choose option.
  2. Invalid django file (you can delete or change the name of the file)
    1. Since no file was found, verify that a Default option is displayed.
    2. Select this option and verify that a launch.json configuration is created with the choose option.
  3. Browse a file
    1. Click on the option Browse Files... and select the file that you want.
    2. Verify that a launch.json configuration is created with the choose option, and that the path has been parsed correctly.
  4. Add own value
    1. You can also include your own text, type a path in the input box and press enter.
    2. Verify that a launch.json configuration is created with the choose option.

Notes

Django's application detection works by looking for the manage.py/app.py file in the root or in a subdirectory just one level lower. So you can try moving the manage.py file one level lower and check that it still appears.

@chrmarti
Copy link

@bhavyaus @aeschli Note that currently the extension is only published for a subset of platforms (#282). You can download the latest for testing from the latest (red) build for the main branch at https://dev.azure.com/monacotools/Monaco/_build?definitionId=499.

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

No branches or pull requests

4 participants