-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Error when trying to debug pyramid app on Windows #737
Comments
I can verify this with the following example code by simply trying to run it under the debugger: from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
def hello_world(request):
return Response('Hello %(name)s!' % request.matchdict)
if __name__ == '__main__':
with Configurator() as config:
config.add_route('hello', '/hello/{name}')
config.add_view(hello_world, route_name='hello')
app = config.make_wsgi_app()
server = make_server('localhost', 8080, app)
server.serve_forever() |
Hello! But when started debug, application stop in 'version.py' on string 220, but after pressing May be my experiment help you check this bug. |
Looking at the code on how pserve works, we'll need implement a different solution. The code that bootstrap a pyramid application is found in @Nicknk @isoengas What versions of Pyramid do you have installed? |
@Nicknk until this is fixed you can change the
|
I can confirm that the solution proposed by @DonJayamanne is working on both the regular & experimental debuggers. Thanks for your support! I'm on pyramid 1.9.1, BTW and this is my launch.json:
|
I can try solution - yes, it work with debuggers without problem. I am using Pyramid 1.9.1, VSCode 1.22.2 and Python 3.6.5 with virtual enviroment. |
Environment data
VS Code version: 1.20.0
Python Extension version: 2018.1.0
Python Version: 3.6.3
OS and version: Windows 10
Actual behavior
Using the default 'Python Pyramid' debug config throws an exception in the debug console:
ValueError: source code string cannot contain null bytes
Expected behavior
Debugger working
Not sure what additional information should be neccessary..
The text was updated successfully, but these errors were encountered: