debugging

Visual Studio 2010 debugger build correctly - compiler pdb and linker pdb not in synch?

我怕爱的太早我们不能终老 提交于 2020-01-04 05:29:05
问题 I have a solution in MS VS 2010 that compiles and builds properly after a rebuild all (1). However, after I make a change to a source file and begin debugging, VS recognizes the project is out of date and builds the project (2) successfully (as expected). The problem is that it seems VS begins debugging the project using obj/pdb/etc.. from (1) above instead of (2). If I break into the debugger and navigate to the module that changed in the file of interest, I'm told "the source file is

Should a diagnostic be emmited for discarded value expressions that do not have side effects?

六眼飞鱼酱① 提交于 2020-01-04 05:23:24
问题 After quite some debugging time I felt silly to discover a goof in my code that boils down to something like this : int main() { double p1[] = { 1, 2, 3 }; double p2[] = { 1, 2, 3 }; int color = 1; bool some_condition = true; if (some_condition) (p1, p2, color); } The (p1, p2, color) expression evaluates to its last operant, but should the compiler protect me in some way ? (Visual Studio told nothing) And yes you guessed it right, I wanted to call a draw function : Draw(p1, p2, color) 回答1: In

iOS 4.3 SDK - Debugging on a 3G Device

元气小坏坏 提交于 2020-01-04 05:17:46
问题 Information on the subject of iOS 4.3 device support is pretty thin on the ground at the moment. However, the lack of a 4.3 beta for iPhone 3G devices (and older iPod touch devices) leads many to believe this could be the end of OS upgrades for older devices. Even if this assumption is incorrect right now, one day it won't be. There are hardware limits that will eventually stop Apple from supporting the oldest of devices with new iOS updates. Given that iPhone application development

iPhone remote debugging over VPN connection

冷暖自知 提交于 2020-01-04 04:10:09
问题 When my iPhone is on my local WiFi Xcode sees my iPhone over the network. My Mac Pro development machine is running macOS Server with a VPN server. When I VPN into my Mac Pro from my iPhone my Mac can ping the iPhone over its VPN IP address screenshot (172.22.0.225) and Network Utility is showing that port 62078 (the required port for debugging) is open. screenshot However, when I try to connect via IP in Xcode it says my iPhone is no longer available. screenshot Any suggestions? 回答1: I

How do I use the keyboard to break into ruby-debug running a rails app?

好久不见. 提交于 2020-01-04 02:58:25
问题 I'm running ruby-debug with bundle exec rdebug script/server on Rails 2.3. When I press Ctrl-C , it exits the entire program and the debugger. I want it to stop execution of the program and bring me into a debugger session. I tried catch Interrupt but it didn't work. Is there an exception that gets called when I stop rails with Ctrl-C that would be good to use for this purpose? Or is there another way? What I want is the equivalent of pressing the Break (pause) button in Visual Studio (I

sed error “unterminated 's' command” troubleshooting

我的未来我决定 提交于 2020-01-04 02:53:47
问题 I am building a script that will, among other things, replace a pattern in an XML file with a folder path. The sed command I am trying to use is: SEDCMD="s|PATHTOEXPORT|$2|" where $2 is the command-line parameter that has the folder path in it. This is later called: sed -e $SEDCMD $FILTER > $TEMPFILTER However, on running the command, I am getting an "unterminated 's' command" error. How can I get around this? I've tried changing the characters used to separate the regex (from / to | ). And I

fatal error LNK1201: error writing to program database - Visual Studio 2003

只谈情不闲聊 提交于 2020-01-04 02:43:13
问题 I get this error: fatal error LNK1201: error writing to program database every time I edit my code and build again in visual studio 2003. The issue is resolved if I restart VS2003 but I need to do this every time i build the project. I have been googling and stackoverflowing ;) for a few hours and have tried the following proposed solution: Change the Debug Information Format from Zi to Z7. ( Property -> C/C++ -> General -> Debug Information Format ) This did not work Change Visual Studio

Android: Problems debugging with the emulator from eclipse

让人想犯罪 __ 提交于 2020-01-04 02:27:09
问题 This is driving me crazy. Like these people, slow-android-emulator, I'm finding running the emulator from eclipse is slow and problematic. As suggested, I've tried running the emulator seperately. But then I don't get my latest changes. I don't know eclipse that well, but I would like something like 'build' and then somehow load the latest image into the emulator. Also, I've tried keeping the emulator open and the continually use run->debug, but after 2 or 3 times, I get errors like the

Detect which script causes server overload - apache + php

心已入冬 提交于 2020-01-04 02:17:27
问题 I'm trying to find which php scripts are overloading my server's cpu, but by the results of top I cannot see specifically which one it is. Is there any way to relate the top processes with the script causing the load ? or is there any other way to debug this? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 19810 apache 15 0 364m 44m 5004 S 15.2 0.3 0:02.39 /usr/sbin/httpd 19827 apache 15 0 364m 44m 4752 S 15.2 0.3 0:01.58 /usr/sbin/httpd 19599 apache 18 0 365m 45m 5012 D 12.3 0.3 0:08

How to fix breakpoint error when debugging in Eclipse?

China☆狼群 提交于 2020-01-04 02:06:46
问题 Need to debug a JAR file "ProA", so import the source code in the project, but there is a strange error in Eclipse while trying to set a breakpoint. Detail as below: Unable to install breakpoint due to missing line number attributes. Modify compiler options to generate line number attributes. I have try to several method to solve, but failed. Under Window > Preferences: Java > Compiler > Classfile Generation , all options have to be to True In .settings folder of your project, look for a file