-
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
Fixes issue while trying to run / debug a pyramid application #530
Conversation
…pplication on windows platform
Thanks for the PR, @jpfarias ! Any chance you can look into why your PR isn't passing continuous integration? |
In another issue it was said the failure appeared to be network-related. I have restarted the jobs to see if that solves anything. |
This is the list of errors, not sure if they are related with my PR though:
|
src/client/debugger/Main.ts
Outdated
@@ -22,6 +22,7 @@ import { DebugClient } from "./DebugClients/DebugClient"; | |||
import { CreateAttachDebugClient, CreateLaunchDebugClient } from "./DebugClients/DebugFactory"; | |||
import { BaseDebugServer } from "./DebugServers/BaseDebugServer"; | |||
import { PythonProcess } from "./PythonProcess"; | |||
import { IS_WINDOWS } from '../../../common/utils'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use the common/utils found under client/common
.
You'll need to use the IS_WINDOWS variable in Common/Utils`
This is because the global vscode
object cannot exist (nor be imported) in the debugger process (it will break it, at least in the current version of VS Code).
src/client/debugger/Main.ts
Outdated
@@ -214,11 +215,15 @@ export class PythonDebugger extends DebugSession { | |||
catch (ex) { | |||
} | |||
if (Array.isArray(args.debugOptions) && args.debugOptions.indexOf("Pyramid") >= 0) { | |||
let pserve = "pserve"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use an immediate and declare it as a constant
const pserve = ISWINDOWS ? 'pserve.exe' : 'pserve'
The most likely cause of the failing tests is the issue I identified above. |
… path for IS_WINDOWS and made pserve an immediate declared as const
Codecov Report
@@ Coverage Diff @@
## master #530 +/- ##
==========================================
+ Coverage 56.42% 56.44% +0.02%
==========================================
Files 212 212
Lines 9968 9970 +2
Branches 1755 1756 +1
==========================================
+ Hits 5624 5628 +4
+ Misses 4340 4338 -2
Partials 4 4
Continue to review full report at Codecov.
|
@brettcannon |
Thanks, I am glad I could help. |
The debugger tries to find
pserve
on all platforms but on windows the correct file name should bepserve.exe
.Fixes #519