dummzeuch 1505 Posted July 26, 2020 (edited) (I am giving some background first, there are actually some questions at the end, so please bear with me.) In older Delphi IDEs there is a compiler option called "Reference Info" with a sub option "Definitions only". In newer IDEs it's called "Symbol reference Info" and can have three values "None", "Definitions Only" and "Reference Info". I never really thought about these options but just left them at the default which is both turned on for old Delphi versions and "Reference Info" for newer ones. Today I noticed that they were set differently in some of my projects and I wondered why that was and for the first time ever looked into the documentation on that topic: Quote When a program or unit is compiled in the {$Y-} (or {DEFINITIONINFO OFF} or {REFERENCEINFO OFF}) state, no symbol reference information is recorded. This disables code browsing and the References page of the Code Browsing feature. The $Y switch is usually used in conjunction with the $D and $L switches, which control generation of debug information and local symbol information. The $Y directive has no effect unless both $D and $L are enabled. Note: Generating full cross-reference information ({$Y+}) can slow the compile/link cycle, so you should not use this except when you need the Project Manager References page. (These are just the last two paragraphs of the remarks.) "Code browsing" is the Ctrl+Click (or Alt+Up or Search -> Find original symbol, which oddly enough has an additional Hotkey Ctrl+G) feature combined with the Alt+Left / Alt + Right keys and the corresponding arrow buttons in the tool bar (respectively the two menu entries in View -> History). So that probably means that Ctrl+Click only works for units that were compiled with "Reference Info" is turned on. I could not verify this though: I switched a Delphi 10.2 project to "Symbol Reference Info = None", deleted all dcus, rebuilt it and Ctrl+Click still worked for all kinds of symbols: Inside the same unit, in other units of the projects and (less surprising, because these are the debug dcus that come with Delphi) in the RTL and VCL units. But what is "the References page of the Code Browsing feature"? Is that what you get when selecting "Find -> Find References" ? If yes, why is that menu item disabled most of the time, even though the default for newer Delphi versions is "Reference Info"? And what is the "Project Manager References Page"? Edited July 26, 2020 by dummzeuch Share this post Link to post
DJof SD 13 Posted September 14, 2021 Add me to the interested parties list for this topic. One thing I learned while reading about {$Y+} and the such is apparently the feature only works when the target is WIN32. But even after switching a project from WIN64 to WIN32 I am still unable to actually find anything that I would call a symbol cross-reference listing. What's the trick? Share this post Link to post
FreeDelphiPascal 19 Posted May 3 Sometimes Ctrl+Click simply won't work. It is probably related to this setting. Share this post Link to post