I want to create a Go app with a console UI using the termui library (which is built on top of the termbox-go library). I can build the app and run it from the command line, but it will not start inside the GoLand IDE (2018.1.3) on Windows 10.
It fails during the termbox-go init when calling syscall.Syscall with SetConsoleScreenBufferSize parameter. The size for the screen buffer is 80x25. Error message is just "The parameter is incorrect."
How can I debug a termbox-go app in the GoLand or other IDE?
I think the way to solve this is to build your executable with Go 1.10 or newer, compile it with the following flags: -gcflags="all=-N -l" (these are very important and will allow the debugger to work a lot better, and then use the Run | Attach to Local Process... option from GoLand and attach to the local process.
I'll see if I can replicate the bug and update this accordingly.
Related
MAIN OBJECTIVE: I'm trying to build and run Chromium browser source code on my Windows. I want to create my own browser. The doc I'm following: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
PROBLEM: I'm trying to follow every step and command as mentioned in the doc. I'm having trouble while running this command gn gen out/Default. I'm getting the following error (see the screenshot):
KeyError: 'WINDOWSSDKDIR'
ERROR at //build/config/win/visual_studio_version.gni:27:7: Script returned non-zero exit code.
Here is vs_toolchain.py: https://github.com/arkadee/demo_files/blob/master/vs_toolchain.py
I'm using the latest version of VS Code. I've tried finding the solution myself, but, there are limited resources on the internet about Chromium. Any help will be appreciated, thanks!
Looks like WindowsSdkDir env variable is missing on your computer. You should install Visual Studio (VS Code is different) and the Window SDK, though it doesn't use VC compiler or linker anymore but GN build system needs the path of Windows SDK to copy all the relevant files to the build folder. Go to command prompt and type set, do you see WindowsSdkDir env variable? If not then either the SDK is missing or the env variable has been wiped out
On Windows 7 I have Eclipse Neon (4.6.3) with Liclipse/PyDev, and I am using a custom 64-bit debug build of Python 2.7.13 (python_d.exe, built with Visual Studio using pcbuild.sln). For the most part, this debug build of Python works with PyDev -- I can configure it as an interpreter and make run/debug sessions. However, the "Attach to Process" feature does not work. If I have a "python_d" process running somewhere on the system and try "Attach to Process" in PyDev, the following happens:
The "Process output" dialog window shows the following:
Connecting to 64 bits target
Injecting dll
Dll injected
Allocating code in target process
Writing code in target process
Allocating return value memory in target process
Injecting code to target process
Waiting for code to complete
Attach finished successfully.
[127156 refs]
Process finished with exitValue: 0
A Windows crash dialog appears saying: "python_d.exe has stopped working"
The "python_d" process to which I was attempting to attach gets this message in its output and then crashes: Fatal Python error: UNREF invalid object
In contrast, the attach mechanism works when I use a regular installed release of Python (which I have configured as a separate interpreter in PyDev).
Are debug builds of Python supposed to work with the PyDev debugger attach mechanism? Is this a bug in PyDev? Could PyDev be improperly using a DLL that is only supposed to be used with Release builds of Python? Does PyDev need to be built from source in a different way in order to support debug builds of Python for this purpose?
Debug builds aren't really supported (the Python ABI is different on debug from release and the code which does the attach is shipped as a dll made to expect the Python release version).
As a note, its code lives on https://github.com/fabioz/PyDev.Debugger/tree/master/pydevd_attach_to_process/dll -- if you really feel this is a must have for you, you can try to change it to work with the debug build of Python.
Most specifically, https://github.com/fabioz/PyDev.Debugger/blob/master/pydevd_attach_to_process/dll/python.h probably needs to be adapted for the debug version.
I have a Mono Winforms project compiled with Xamarin Studio. When I run from XS, it does not show a console windows. However, after I bundle the package on the Mac( using mkbundle and pkgbuild) and then install it, a bash shell is shown when I execute the program. When I exit the program, the shell remains open with a final message "Process completed". I then have to close the shell window.
I would like to be able to execute the application and not show the console window. It would also be acceptable if the shell window would close by itself when the application exits.
I tried and added this tag to my csproj but no good:
WinExe
I saw another post which stated to use a compiler switch to specify the target to be WinExe. However, I do not see anywhere in XS to add custom compiler switches. ( I think the switch was /target:WinExe).
Anyone have any workaround that these have used for this case?
Thanks in advance.
Project options / Build / General / Code Generation / Compile Target
Executable = /target:exe
Library = /target:library
Executable with GUI = /target:winexe
Module = /target:module
I'm trying to automatically download Nuget.exe from a Rakefile, in order to minimize the amount of initial setup needed to run my samples on GitHub.
I've understand how to download a file (I'm using HTTParty) and how to save a binary file (using the b flag on File.new) but now I've got problem running Nuget.exe. In particular:
if I launch it directly or from PowerShell, the executable runs fine;
if I launch it from cmd or from a Rakefile (which in turn runs cmd), Windows tells me that the program "stopped working".
I reproduced the same behavior with the Nuget bootstrapper, so I thought that the cause was some configuration in my computer.
It then occured to me that I installed ansicom, a library to handle ANSI sequences. I disabled it and then Nuget started without any problem.
I have a XCode which builds and runs under XCode.
I would like to know if it is possible to debug it using a gdb I build under Mac OSX (gdb 7 to be specified). If yes, can you please tell me how can I do that?
Thank you.
gdb-7.0 reverse debugging currently can only work with two classes of targets:
1) a remote simulator/emulator/virtual-machine that supports going backwards, or
2) the built in "process record" target, which at present has only been ported to x86-linux, x86-64 linux, and moxie linux.
Well, now -- I take that back. I recently discovered that process record can work with any remote x86 target, so if you're connecting with your macintosh target via "target remote", you might just be able to do it!
There is an online tutorial for process record here:
http://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial
More info about process record here:
http://www.sourceware.org/gdb/wiki/ProcessRecord
And about gdb reverse debugging here:
http://www.sourceware.org/gdb/wiki/ReverseDebug
So you want to use your own version of gdb to debug your executable? Easy!
Open Terminal, and do something like this:
$ cd <directory where Xcode project lives>
$ cd build/Debug (for example - depends on project configuration)
$ /usr/local/bin/my-gdb ./MyExecutable
Of course, specifying the actual path to your custom gdb version.
XCode's debugger is gdb (likely with Apple-specific modifications.) When you debug an application you can get to the gdb command line by opening the Console from the Run menu.
What requirements are imposed on your application that would require you to debug with your own version of gdb?