debugging

How to get method name for debug output in Android/Java?

自闭症网瘾萝莉.ら 提交于 2019-12-24 19:08:59
问题 I would like to make a macro that prints out the current method's name during Log.d and Log.e output. Right now I simply type the method name within a hard-coded string, but this is obviously inefficient should the method name change in the future, as each string needs to be searched for and replaced. I am aware of using getMethodName() as indicated in this post: How to get method name in Java This one also looks promising: Debugging with helper extension method There are countless numbers of

Debug tab is not available on the project properties page of a C# web app

岁酱吖の 提交于 2019-12-24 19:06:01
问题 I'm trying to access the DEBUG tab on the project properties page of a C# web app but there is no such tab (Visual Studio 2010) The project is a web application project. Anyone knows how to make the debug tab visible? Thanks! 回答1: There is no "Debug" tag in project properties for web application projects. This tab is only available in C# Windows and Console projects. Depending on what you are trying to do, you may want to look at the 'Build' or the 'Web' tab for options that you may expect to

Access global variables from Require.js in the Chrome Developer Console

不羁的心 提交于 2019-12-24 18:28:52
问题 I am creating an ASP.NET single-page application, and have a require.js config file that runs on application start, referencing jQuery, Sammy.js, and knockout.js. I have created shims for the three third-party libraries to allow me to access them on a global level: require.config({ paths: { "jquery": "/Scripts/jquery-2.1.4.min", "sammy": "/Scripts/sammy-0.7.5.min", "knockout": "/Scripts/knockout-3.3.0", "text": "/Scripts/text", "appVm": "/Scripts/app/appViewModel" }, shim: { "jquery": {

Struggling - yet another memory corruption problem, bad alloc (C++, VS 2008)

独自空忆成欢 提交于 2019-12-24 18:16:47
问题 I've read a lot of posts on memory corruption and it seems like it can be a considerably difficult problem to solve. When I run my code on my linux machine it executes fine and valgrind doesn't report any leaks or errors. However when I run the code on my lab's windows machine with VS2008, I get a bad alloc error, stopping with _RAISE(nomem). This seems strange to me because I would have expected valgrind to catch it. void *__CRTDECL operator new(size_t size) _THROW1(_STD bad_alloc) { // try

gdb error- File not in executable format: File format not recognized

久未见 提交于 2019-12-24 17:22:23
问题 I am trying to debug a certain program called xdf with gdb but when i run gdb xdf, i get the following error: "/home/nealtitusthomas/X-ray_astronomy/heasoft-6.24/x86_64-pc-linux-gnu-libc2.27/bin/xdf": not in executable format: File format not recognized The program is symbolically linked and the output of file /home/nealtitusthomas/X-ray_astronomy/heasoft-6.24/x86_64-pc-linux-gnu-libc2.27/bin/xdf is: /home/nealtitusthomas/X-ray_astronomy/heasoft-6.24/x86_64-pc-linux-gnu-libc2.27/bin/xdf:

Getting a line number for nodejs errors

耗尽温柔 提交于 2019-12-24 17:17:10
问题 I am writing some code to automate a build process using the Grunt task runner and Node. When there is an error while running a task, it gets displayed without line number or file. This makes finding the actual issue a pain. Example: $ grunt build Running "build" task Warning: Cannot set property '_appConfig' of undefined Use --force to continue. Aborted due to warnings. I am not entirely sure what is responsible for handling these error messages (node, grunt) as I'm quite new to JS

Is it possible to set breakpoints at a specific bytecode instruction?

折月煮酒 提交于 2019-12-24 17:15:38
问题 I'm using jdb to remotely debug a Java application of which I don't have the source code. Furthermore, the application jars are obfuscated. I can set method breakpoints but, is it possible to set breakpoints at a specific bytecode instruction within a method? The idea I have is to use some disassembler like javap to identify the interesting instructions. Can jdb or other Java debugger do this? 回答1: You need line numbers to breakpoint on (something I assume has been removed). You can

How to know who is the parent thread of a given thread ID

删除回忆录丶 提交于 2019-12-24 16:37:31
问题 I'm debugging a program in vs 2008. There is a thread list with thread IDs. Is the any way or tool that I can use to identify the parent thread of a given thread ID? Thanks. 回答1: There is no API, at least standard and documented, to obtain a creator thread ID for a given thread. Neither Performance Monitor, Visual Studio IDE, Process Explorer nor Spy++ provide this information. Once started, a thread is not dependent on its creator any longer and runs independently; there is no parent-child

Questions about compiling Python in debug mode

倾然丶 夕夏残阳落幕 提交于 2019-12-24 16:23:21
问题 I am using Ubuntu 12.04, Python 2.7.3. I am having a segmentation fault in a C extension I have co-written. It seems to come from a pointer that was not free'd properly. I then use valgrind to find memory leaks. According to that answer, I have to compile Python in debug mode to get a valgrind friendly version of Python and get rid of its irrelevant reports. How to compile Python in debug mode? Even though the answer I linked answers part of that question, it does not provide me enough

How do I debug a firefox extension, it seemingly crashes silently

血红的双手。 提交于 2019-12-24 16:22:11
问题 I cannot figure out how to debug my simple extension. Script (a content script) loads (because the first console.log call shows in the tab's console) but then nothing. There's no error what so ever and no second console.log call. My question is not about solving my code issue (there surely is one, if only firefox would tell me where), it's about finding the place where warnings/errors about the add-on are in firefox (like 'sdfsdf has no object property ...') about:debugging is no help, the