Sysprogs forums › Forums › VisualGDB › Go to definition / go to declaration
- This topic has 3 replies, 2 voices, and was last updated 6 years, 6 months ago by support.
-
AuthorPosts
-
June 10, 2018 at 21:17 #21063Ophidian14Participant
If there was one feature I’d like to be improved right now in VisualGDB it would be getting “Go to definition” and “Go to declaration” working reliably 100% of the time. When I use it currently, I observe a widely varying array of behaviors, choose from any of the below:
- Nothing happens at all. Meaning, I right-click, go to definition, and I get no reaction at all from Visual Studio. Cursor just keeps blinking right where I was.
- Visual Studio hangs for 15 seconds. At the conclusion of the 15 seconds, I sometimes get taken to the definition, sometimes I get taken to the declaration, sometimes I stay where I am.
- A “Find all symbols” box appears in the lower part of my screen saying it is updating some cache. CPU goes to 100%, and the process never concludes. I force kill CppEngine64.exe to abort.
- Rarely, I get what I want, which is that I’m actually immediately taken to the definition of the thing I’m looking for (whether it’s a struct definition, function definition, or whatever).
At a high level would it be possible to understand what governs whether I get 1, 2, 3, or 4? Any tips on making this working better than it does? I’ve sometimes noticed that (for example) if I get outcome #1, and then I go into the code, type “this->”, wait for the autocomplete to come up, and then try again, I get better results… however this only works sometimes, not all the time.
Thanks for any help/tips/pointers Support is able to provide.
June 11, 2018 at 04:21 #21064supportKeymasterHi,
This is likely caused by VisualGDB updating its cache. Although normally VS should not hang for 15 seconds – instead it should display a detailed progress message.
Either way, please try opening the View->Clang IntelliSense Diagnostics Console window. It will contain detailed output explaining what exactly the Clang engine is doing. Feel free to post some snippets from it and we can explain what exactly is going on behind the scenes.
June 15, 2018 at 15:28 #21131Ophidian14ParticipantHere’s an example of #2. I right-clicked on a type name and did Go to Definition. The type was defined in an #include that was directly included in this .cpp that I was editing. VS2017 was completely frozen for the entire time this was happening. Thoughts?
[+1:12:18.091] GoTo request: GotoDefn [+1:12:18.092] Preparing for GoTo parsing [+1:12:18.092] Starting GoTo parsing [+1:12:18.092] Starting operation: Parse - Goto [+1:12:18.094] Found entity at cursor location: BT::Communication::ITcpCommunicatorListener=s (b) [+1:12:18.095] Operation completed: Parse - Goto [3 msec] [+1:12:18.118] [0%] gftoCheckingForModifications [+1:12:18.252] [1%] gftoCheckingForModifications [+1:12:18.375] [2%] gftoCheckingForModifications [+1:12:18.582] [3%] gftoCheckingForModifications [+1:12:18.638] \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp has not changed since last build. Doing a quick recheck.. [+1:12:18.719] [4%] gftoCheckingForModifications [+1:12:18.814] [5%] gftoCheckingForModifications [+1:12:18.840] [6%] gftoCheckingForModifications [+1:12:18.919] [7%] gftoCheckingForModifications [+1:12:19.050] [8%] gftoCheckingForModifications [+1:12:19.189] [9%] gftoCheckingForModifications [+1:12:19.319] [10%] gftoCheckingForModifications [+1:12:19.474] [11%] gftoCheckingForModifications [+1:12:19.607] [12%] gftoCheckingForModifications [+1:12:19.742] [14%] gftoCheckingForModifications [+1:12:19.886] [15%] gftoCheckingForModifications [+1:12:20.036] [16%] gftoCheckingForModifications [+1:12:20.169] [17%] gftoCheckingForModifications [+1:12:20.304] [18%] gftoCheckingForModifications [+1:12:20.471] [19%] gftoCheckingForModifications [+1:12:20.639] [20%] gftoCheckingForModifications [+1:12:20.761] [21%] gftoCheckingForModifications [+1:12:20.890] [22%] gftoCheckingForModifications [+1:12:21.053] [23%] gftoCheckingForModifications [+1:12:21.178] [24%] gftoCheckingForModifications [+1:12:21.250] [25%] gftoCheckingForModifications [+1:12:21.339] [27%] gftoCheckingForModifications [+1:12:21.532] [28%] gftoCheckingForModifications [+1:12:21.643] [29%] gftoCheckingForModifications [+1:12:21.756] [30%] gftoCheckingForModifications [+1:12:21.842] [31%] gftoCheckingForModifications [+1:12:21.974] [32%] gftoCheckingForModifications [+1:12:22.093] [33%] gftoCheckingForModifications [+1:12:22.139] Saved data for \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp is up to date [+1:12:22.139] Starting fpsParsingFileBody on \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp [+1:12:22.229] [34%] gftoCheckingForModifications [+1:12:22.369] [35%] gftoCheckingForModifications [+1:12:22.452] Starting fpsAnalyzingReferences on \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp [+1:12:22.542] [36%] gftoCheckingForModifications [+1:12:22.689] [37%] gftoCheckingForModifications [+1:12:22.808] [38%] gftoCheckingForModifications [+1:12:22.929] [40%] gftoCheckingForModifications [+1:12:23.068] [41%] gftoCheckingForModifications [+1:12:23.201] [42%] gftoCheckingForModifications [+1:12:23.330] [43%] gftoCheckingForModifications [+1:12:23.527] [44%] gftoCheckingForModifications [+1:12:23.672] [45%] gftoCheckingForModifications [+1:12:23.804] [46%] gftoCheckingForModifications [+1:12:23.938] [47%] gftoCheckingForModifications [+1:12:24.076] [48%] gftoCheckingForModifications [+1:12:24.210] [49%] gftoCheckingForModifications [+1:12:24.323] [50%] gftoCheckingForModifications [+1:12:24.350] Completed fpsAnalyzingReferences on \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp [+1:12:24.408] Completed fpsParsingFileBody on \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp [+1:12:24.408] Checking \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp for missing headers.. [+1:12:24.408] No missing headers for \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp [+1:12:24.434] Could not determine name type for BT::Communication::ITcpCommunicatorListener. Search results may be inaccurate. [+1:12:24.434] Found 1 TUs with matching names to search for BT::Communication::ITcpCommunicatorListener [+1:12:24.434] Searching in \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Private\TcpCommunicator.cpp from C:\Users\caseltine\Documents\VisualGDB\HighFrequency90\HighFrequency90.vcxproj... [+1:12:24.509] [51%] gftoCheckingForModifications [+1:12:24.649] [52%] gftoCheckingForModifications [+1:12:24.786] [54%] gftoCheckingForModifications [+1:12:24.917] [55%] gftoCheckingForModifications [+1:12:25.020] [56%] gftoCheckingForModifications [+1:12:25.035] [57%] gftoCheckingForModifications [+1:12:25.059] [58%] gftoCheckingForModifications [+1:12:25.064] [59%] gftoCheckingForModifications [+1:12:25.120] [60%] gftoCheckingForModifications [+1:12:25.144] [61%] gftoCheckingForModifications [+1:12:25.173] [62%] gftoCheckingForModifications [+1:12:25.219] [63%] gftoCheckingForModifications [+1:12:25.245] [64%] gftoCheckingForModifications [+1:12:25.285] [65%] gftoCheckingForModifications [+1:12:25.344] [67%] gftoCheckingForModifications [+1:12:25.407] [68%] gftoCheckingForModifications [+1:12:25.427] [69%] gftoCheckingForModifications [+1:12:25.517] [70%] gftoCheckingForModifications [+1:12:25.531] [71%] gftoCheckingForModifications [+1:12:25.542] [72%] gftoCheckingForModifications [+1:12:25.545] [73%] gftoCheckingForModifications [+1:12:25.549] [74%] gftoCheckingForModifications [+1:12:25.553] [75%] gftoCheckingForModifications [+1:12:25.559] [76%] gftoCheckingForModifications [+1:12:25.572] [77%] gftoCheckingForModifications [+1:12:25.579] [78%] gftoCheckingForModifications [+1:12:25.589] [80%] gftoCheckingForModifications [+1:12:25.602] [81%] gftoCheckingForModifications [+1:12:25.605] [82%] gftoCheckingForModifications [+1:12:25.609] [83%] gftoCheckingForModifications [+1:12:25.612] [84%] gftoCheckingForModifications [+1:12:25.618] [85%] gftoCheckingForModifications [+1:12:25.622] [86%] gftoCheckingForModifications [+1:12:25.625] [87%] gftoCheckingForModifications [+1:12:25.629] [88%] gftoCheckingForModifications [+1:12:25.632] [89%] gftoCheckingForModifications [+1:12:25.636] [90%] gftoCheckingForModifications [+1:12:25.639] [91%] gftoCheckingForModifications [+1:12:25.642] [92%] gftoCheckingForModifications [+1:12:25.646] [94%] gftoCheckingForModifications [+1:12:25.650] [95%] gftoCheckingForModifications [+1:12:25.653] [96%] gftoCheckingForModifications [+1:12:25.658] [97%] gftoCheckingForModifications [+1:12:25.661] [98%] gftoCheckingForModifications [+1:12:25.665] [99%] gftoCheckingForModifications [+1:12:25.667] [0%] gftoScanningFile positioncoordinatordatabaseaccess.cpp [+1:12:25.668] Cannot open \\10.10.161.129\build\cfa\laser\laser\bt.relationaldata\private\positioncoordinatordatabaseaccess.cpp: no such file or directory [+1:12:25.668] [0%] gftoScanningFile fitinputsfacade.cpp [+1:12:25.668] Cannot open \\10.10.161.129\build\cfa\laser\laser\compass\bt.paravane\business\fitinputsfacade.cpp: no such file or directory [+1:12:25.668] [0%] gftoScanningFile positionmanager.cpp [+1:12:25.669] Cannot open \\10.10.161.129\build\cfa\laser\laser\compass\bt.paravane\business\positionmanager.cpp: no such file or directory [+1:12:25.669] [1%] gftoScanningFile deltapositionsnapshot.cpp [+1:12:25.670] Cannot open \\10.10.161.129\build\cfa\laser\laser\compass\bt.paravane\infrastructure\deltapositionsnapshot.cpp: no such file or directory [+1:12:25.670] [1%] gftoScanningFile transmissiongroupmappingcontroller.cpp [+1:12:25.670] Cannot open \\10.10.161.129\build\cfa\laser\laser\mdsnapshotpersister\bt.mdsnapshotpersister\bt.mdsnapshotpersister.dataaccess\transmissiongroupmappingcontroller.cpp: no such file or directory [+1:12:25.670] [2%] gftoScanningFile mdsnapshotpersisterdatabaseaccess.cpp [+1:12:25.670] Cannot open \\10.10.161.129\build\cfa\laser\laser\mdsnapshotpersister\bt.mdsnapshotpersister\bt.mdsnapshotpersister.dataaccess\mdsnapshotpersisterdatabaseaccess.cpp: no such file or directory [+1:12:25.670] [2%] gftoScanningFile mdsnapshotpersistermanagement.cpp [.....] [+1:12:25.810] [198%] gftoScanningFile positionfirminfosyscachetests.cpp [+1:12:25.810] Cannot open \\10.10.161.129\build\cfa\laser\laser\bt.chronosclient\tests\positionfirminfosyscachetests.cpp: no such file or directory [+1:12:25.810] [198%] gftoScanningFile positionclient.cpp [+1:12:25.810] Cannot open \\10.10.161.129\build\cfa\laser\laser\bt.chronosclient\private\derived\positionclient.cpp: no such file or directory [+1:12:25.810] [198%] gftoScanningFile marketdatasnapshot.pb.h [+1:12:25.810] Cannot open \\10.10.161.129\build\cfa\laser\laser\contracts\marketdatasnapshot.pb.h: no such file or directory [+1:12:25.816] [100%] gftoDone [+1:12:25.961] Completed fpsBuildingPreamble on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:25.962] Successfully rebuilt PSF 1 (normal preamble).. [+1:12:25.962] Saving PSF 1 (normal preamble) to C:\Users\caseltine\Documents\VisualGDB\HighFrequency90\CodeDB\HighFrequency90-Debug-Win32.0001\tcpcommunicator.npd.. [+1:12:25.962] Starting fpsSavingPSF on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:25.963] Completed fpsSavingPSF on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:25.963] Successfully saved PSF 1 (normal preamble).. [+1:12:25.963] Starting fpsParsingFileBody on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:26.372] Starting fpsAnalyzingReferences on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:28.256] Completed fpsAnalyzingReferences on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:28.323] Completed fpsParsingFileBody on \\10.10.161.129\build\cfa\laser\laser\bt.communication\private\tcpcommunicator.cpp [+1:12:28.324] Found definition in \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Private\TcpCommunicator.cpp. [+1:12:28.334] \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Public\ITcpCommunicatorListener.h belongs to a compatible project and will be handled by our engine [+1:12:28.336] \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Public\ITcpCommunicatorListener.h belongs to a compatible project and will be handled by our engine [+1:12:28.347] Checking \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp for missing headers.. [+1:12:28.347] No missing headers for \\10.10.161.129\build\cfa\laser\magnum\custom\test90_4.cpp [+1:12:28.348] Indentation size: 2, will insert spaces [+1:12:28.367] Active document changed to \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Public\ITcpCommunicatorListener.h [+1:12:28.368] Checking \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h for missing headers.. [+1:12:28.368] No missing headers for \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.369] Starting operation: Parse - Check [+1:12:28.371] Starting operation: Reparsing \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Public\ITcpCommunicatorListener.h [+1:12:28.374] \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h has changed since last build. Doing full analysis.. [+1:12:28.418] PSF 1 (normal preamble) does not match main file. It will be re-built [+1:12:28.418] Rebuilding PSF 1 (normal preamble).. [+1:12:28.418] Starting fpsBuildingPreamble on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.519] Completed fpsBuildingPreamble on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.519] Successfully rebuilt PSF 1 (normal preamble).. [+1:12:28.519] Saving PSF 1 (normal preamble) to C:\Users\caseltine\Documents\VisualGDB\HighFrequency90\CodeDB\HighFrequency90-Debug-Win32.0001\tmp00000004.npd.. [+1:12:28.519] Starting fpsSavingPSF on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.521] Completed fpsSavingPSF on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.521] Successfully saved PSF 1 (normal preamble).. [+1:12:28.521] Starting fpsParsingFileBody on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.829] Starting fpsAnalyzingReferencesLightweight on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.860] Completed fpsAnalyzingReferencesLightweight on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.867] Completed fpsParsingFileBody on \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.867] Starting operation: Exporting parse results [+1:12:28.867] Checking \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h for missing headers.. [+1:12:28.867] No missing headers for \\10.10.161.129\build\cfa\laser\laser\bt.communication\public\itcpcommunicatorlistener.h [+1:12:28.869] Operation completed: Exporting parse results [1 msec] [+1:12:28.869] Checked \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Public\ITcpCommunicatorListener.h: 0 error records [+1:12:28.871] Operation completed: Reparsing \\10.10.161.129\build\cfa\Laser\Laser\BT.Communication\Public\ITcpCommunicatorListener.h [500 msec] [+1:12:28.871] Operation completed: Parse - Check [502 msec] [+1:12:28.886] Starting operation: Parse - HighlightBraces [+1:12:28.886] Operation completed: Parse - HighlightBraces [0 msec]
June 15, 2018 at 22:03 #21138supportKeymasterHi,
Yes, it looks like VisualGDB is checking for modified source/header files in your project and is trying to rebuild the preamble for the newly opened file. This results in reading many header files in a short succession, likely overloading the network connection you are using and delaying the main Visual Studio thread that is trying to access the source file.
Unfortunately there’s not much to optimize on our side though – VisualGDB needs to read all those files in order to build the necessary caches and if the network connection cannot handle this responsively, it would delay everything else. The good news is that VisualGDB only does this once after you open the solution. Once the necessary data is cached, VisualGDB won’t need to recompute/recheck it again.
Also storing the source code on the Windows side (or using the direct SSH access with the Advanced CMake Project Subsystem so that VisualGDB can prioritize file accesses internally) could speed this up.
-
AuthorPosts
- You must be logged in to reply to this topic.