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

"source is not available" when i use http module in vscode plugin #902

Closed
BleyChen opened this issue Dec 2, 2015 · 5 comments
Closed

"source is not available" when i use http module in vscode plugin #902

BleyChen opened this issue Dec 2, 2015 · 5 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@BleyChen
Copy link

BleyChen commented Dec 2, 2015

It throw “source is not available” error when I imported “http” module and use one API in my code ,anyone know what’s the problem?

Code :
http.request('http://www.google.com', function(response) {
console.log(response.statusMessage) });
plugin sample code(http://mediasvc1nxn1n47jdwb5.blob.core.windows.net/guided-tours/testIntellisenseJavascript.zip)

Steps for repro this problem:

  1. Download the source and open it in VSCode
  2. Run it and you will see an vscode instance
  3. Change the language mode in “untitled-1” from “Plain Text” to “Javascript”
    aa
    4.Type an character and it will trigger the method “”,then you will see the error.
    bb
@weinand
Copy link
Contributor

weinand commented Dec 2, 2015

@BleyChen In what line do I have to set a breakpoint? (Breakpoints are not stored in your zipped workspace). Do I have to step through the code?

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Dec 2, 2015
@BleyChen
Copy link
Author

BleyChen commented Dec 3, 2015

Set breakpoint on line 52 for the code :
http.request('http://www.google.com', function(response) {
console.log(response.statusMessage) // Show the HTML for the Google homepage.
});

in "extension.ts" file

@BleyChen
Copy link
Author

BleyChen commented Dec 7, 2015

@weinand can you repro this problem?

@weinand
Copy link
Contributor

weinand commented Dec 9, 2015

@BleyChen yes, I can reproduce the problem. This problem is unrelated to the imported "http" module. The debugger ended up in some internal JavaScript code for which no TypeScript source is available. Instead of trying to show the *.ts source we should show the *.js instead.

@weinand
Copy link
Contributor

weinand commented Dec 9, 2015

This issue was moved to microsoft/vscode-node-debug#21

@weinand weinand closed this as completed Dec 9, 2015
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

No branches or pull requests

2 participants