Code Monkey home page Code Monkey logo

Comments (18)

dmitshur avatar dmitshur commented on August 23, 2024 2

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.

image

image

from vscode-go.

mattetti avatar mattetti commented on August 23, 2024

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.

jchannon avatar jchannon commented on August 23, 2024

View -> Toggle Output?

from vscode-go.

mattetti avatar mattetti commented on August 23, 2024

@jchannon when I do that, it only shows the git output

from vscode-go.

mattetti avatar mattetti commented on August 23, 2024

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.

rudygt avatar rudygt commented on August 23, 2024

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.

jeromelaurens avatar jeromelaurens commented on August 23, 2024

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.

lukehoban avatar lukehoban commented on August 23, 2024

Agreed - this is a bug. Redirecting the debugees output to the debug console is not yet implemented.

from vscode-go.

jeromelaurens avatar jeromelaurens commented on August 23, 2024

@lukehoban ok , some bugs of course but you've done a great job so far !

from vscode-go.

rudygt avatar rudygt commented on August 23, 2024

@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.

yuntan avatar yuntan commented on August 23, 2024

This change fixed the issue for me.
yuntan@e3ec828

from vscode-go.

rudygt avatar rudygt commented on August 23, 2024

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.

lukehoban avatar lukehoban commented on August 23, 2024

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.

yuntan avatar yuntan commented on August 23, 2024

seems #41 is more clean solution for this problem.

from vscode-go.

rudygt avatar rudygt commented on August 23, 2024

Thanks for your help @yuntan 👍

from vscode-go.

Stabledog avatar Stabledog commented on August 23, 2024

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.

dcsan avatar dcsan commented on August 23, 2024

@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: ''

image

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.

dcsan avatar dcsan commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.