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

Django debugger not work #170

Closed
DonJayamanne opened this issue Nov 14, 2017 · 7 comments
Closed

Django debugger not work #170

DonJayamanne opened this issue Nov 14, 2017 · 7 comments
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug

Comments

@DonJayamanne
Copy link

From @SwagVervindil on August 27, 2017 18:2

Environment data

VS Code version: 1.15.1
Python Extension version: 0.7.0 (3 August 2017)
Python Version: 3.6.0
OS and version: Windows 10

Actual behavior

When I start debug my code break when I want get request.data:
django.http.request.RawPostDataException: You cannot access body after reading from request's data stream
And server return 500 HttpCode
log
If I set reakpoint before request.data i have this errors, bit if set after all work fine

Expected behavior

To run next line. I check in pycharm and this code work fine.

Code

capture

I use djangorestframework version: 3.5.4

launch.json

{
  "name": "Django",
  "type": "python",
  "request": "launch",
  "stopOnEntry": false,
  "pythonPath": "${config:python.pythonPath}",
  "program": "${workspaceRoot}/manage",
  "cwd": "${workspaceRoot}",
  "console": "none",
  "args": [
    "runserver",
    "--noreload",
    "0.0.0.0:8000"
  ],
  "exceptionHandling": {
      "ignore": ["ImportError"]
  },
  "env": {
    "DJANGO_SETTINGS_MODULE": "settings.dev"
  },
  "debugOptions": [
    "WaitOnAbnormalExit",
    "WaitOnNormalExit",
    "RedirectOutput",
    "DjangoDebugging"
  ]
} 

Copied from original issue: DonJayamanne/pythonVSCode#1181

@DonJayamanne
Copy link
Author

@SwagVervindil The PTVS team is in the middle of some major changes to their debugger. As soon as they are done with that work i'll look into this. Apologies for the delay.

@DonJayamanne
Copy link
Author

@SwagVervindil Would you be able to provide a sample repository to replicate this issue?
@jarshwah if you too are experiencing this issue please could you provide a sample repository to replicate this issue?

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster and removed awaiting 1-verification labels Jan 8, 2018
@jarshwah
Copy link

jarshwah commented Jan 8, 2018

I do not have this issue - I was just trying to triage from the other issue.

@DonJayamanne DonJayamanne removed their assignment Jan 9, 2018
@MikhailArkhipov
Copy link

It's been a while without more info, closing. Feel free to reactivate if this is still a problem. Thanks.

@mozillalives
Copy link

@DonJayamanne I also had this issue and I created a simple app to help reproduce it. Will this help?

https://github.com/mozillalives/django-vscode-demo

VS Code version: 1.22.2
Python Extension version: 2018.3.1
Python Version: 3.6.4
OS and version: MacOS 10.13.4

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels May 1, 2018
@brettcannon brettcannon reopened this May 1, 2018
@DonJayamanne DonJayamanne self-assigned this May 3, 2018
@DonJayamanne
Copy link
Author

DonJayamanne commented May 3, 2018

I've managed to replicate this issue at my end (on the experimental version of the debugger).
The upstream issue is filed here microsoft/ptvsd#406

@DonJayamanne
Copy link
Author

This has been resolved in the new debugger microsoft/ptvsd#406

@lock lock bot locked as resolved and limited conversation to collaborators Oct 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants