Comments (18)
After seeing a console.log()
call in the code, I was wondering the same thing.
I found it in the help menu, under "Toggle Developer Tools", on OS X.
from vscode-go.
Same question here, I'm having issues with the debugger and wish I could see the output, I'm sure it's somewhere obvious that I just can't find :(
from vscode-go.
View -> Toggle Output?
from vscode-go.
@jchannon when I do that, it only shows the git output
from vscode-go.
thanks @shurcooL but it looks like the debugger isn't logging anything when launching, I was having issues with the debugger because I didn't properly install dlv on OS X: #20
I did wish there was a way to see stdout output somewhere but it might be up to the extension you use.
from vscode-go.
Same here,
the "Debug Console" is always empty after the execution of a simple hello world, if I put a breakpoint in the printf it stops there but the output is not show anywhere.
from vscode-go.
Thanks @shurcooL but we are talking here about the go program output when debugging. I tried to open the console from developer tools : the output is not showing.
Same behaviour as @rudygt : the debug console always empty, but breakpoint works with variables.
I have other strange behaviour when debugging, but before posting them, I'd like to see the output.
About Delve, I have installed the latest version with the certificate, everything seems fine (I'm using it with intellig idea go plugin)
from vscode-go.
Agreed - this is a bug. Redirecting the debugees output to the debug console is not yet implemented.
from vscode-go.
@lukehoban ok , some bugs of course but you've done a great job so far !
from vscode-go.
@lukehoban I would like to help but, I'm starting with vs code, typescript and go, I see in this class https://github.com/Microsoft/vscode-go/blob/master/src/debugAdapter/goDebug.ts (line 127) a handler for the standard output of the debugProcess that just send the information to console.log, can you point me in the right direction to make it send the information to the debug console? or I'm lost.
Thanks!, nice work with this plugin.
from vscode-go.
This change fixed the issue for me.
yuntan@e3ec828
from vscode-go.
Thanks @yuntan I was looking over the node debug adapter, https://github.com/Microsoft/vscode-node-debug/blob/master/node/nodeDebug.ts, the "_captureOutput" method does exactly that.
👍
from vscode-go.
Great - thanks @yuntan. Feel free to open up a PR for this work as well so we can work on getting these changes merged in.
from vscode-go.
seems #41 is more clean solution for this problem.
from vscode-go.
Thanks for your help @yuntan 👍
from vscode-go.
It's August of 2017 -- almost 2 years later. I just discovered and installed VScode for Mac, installed the C++ support, and I'm having this same problem in v1.14.2: when my program writes to stdout, that does not show up anywhere in the debugger's output window.
This seems like a really basic behavioral deficiency that makes me wonder... "is anybody using this tool on the Mac?" Am I missing some secret sauce to be able to see the output of my program while debugging?
Edit: it seems that the default value in launch.json for "externalConsole" is the problem -- when it's set to 'true', I can't find the output of my program. If changed to 'false', the program output appears intermixed with the debugger's output messages. So that's better than nothing.
from vscode-go.
@Stabledog what's the correct incant for launch.json?
file: 'file:///Users/dc/dev/rikai/nlp-rnd/nlp-debug/.vscode/launch.json'
severity: 'Warning'
message: 'Attribute 'externalConsole' is deprecated, use 'console' instead.'
at: '13,7'
source: ''
using
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "debug server",
"program": "${workspaceRoot}/server.js",
"console": "integratedTerminal"
}
]
}
from vscode-go.
oh UPDATE:
works with the above with standard console.log
but for some reason TJs' debug
module doesn't output here. must be something to do with how the console.log is being hijacked fighting between these two.
from vscode-go.
Related Issues (20)
- go.formatFlags not working with gofmt -s (simplify) HOT 5
- Couldn't start client gopls HOT 5
- Unable to run Go in VS Code - command not found HOT 4
- Adding a module using `go get` from outside vscode is not recognized until go.mod is reopened HOT 5
- Can not use VS code for GO: Installing github.com/go-delve/delve/cmd/dlv FAILED HOT 5
- Disable real-time syntax error highlighting with gopls HOT 1
- Problem in mouse hover tooltip HOT 3
- Automatically Infer Path Mapping for Remote Debugging
- // .*DO NOT EDIT.?$ HOT 6
- Extension issue HOT 1
- 0.14.2 broken on macos HOT 3
- Extension Repository Migration Plan HOT 1
- Region comments not working when extension is enabled HOT 3
- Debugging uses wrong working directory HOT 4
- Background of covered and not covered code cannot be removed after running package test HOT 9
- Extension Migration Plan HOT 4
- numeric constants containing underscore are not colored correctly HOT 1
- Gopls does not support versions of go <=1.12 HOT 2
- Unable to set breakpoint when using gutter and clear Code coverage HOT 3
- Updated to 0.14.3 or the nightly and entirely stopped working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-go.