BDEBUGGER - minor issue

May 20, 2008
3,515
4
Elkridge, MD, USA
Environment variables:
usrdsk="C:\Documents and Settings\ESF\desktop"
windsk="C:\Documents and Settings\All Users\desktop"

Aliases:
usrdsk=cdd/n %usrdsk
windsk=cdd/n %windsk

In a batch file I was debugging I have the command:
do dr in /l windsk usrdsk

When I use the variable view window to display DR in the loop, the value
shown is the expanded alias, not the expanded variable. This seems to happen
only for the value display, because the batch line containing "pushd %[%dr]"
is executed correctly, the debugger helped me find my file naming mistakes
resulting in odd but correct display by the batch file.
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
12,340
149
> Environment variables:
> usrdsk="C:\Documents and Settings\ESF\desktop"
> windsk="C:\Documents and Settings\All Users\desktop"
>
> Aliases:
> usrdsk=cdd/n %usrdsk
> windsk=cdd/n %windsk

I can't imagine *why* you would want to name your aliases and variables the
same, but regardless ...


> In a batch file I was debugging I have the command:
> do dr in /l windsk usrdsk

Without the body of your DO loop I cannot even begin to guess at what you're
seeing.


> When I use the variable view window to display DR in the loop, the
> value shown is the expanded alias, not the expanded variable.

There is no such thing as a "variable view window" -- are you talking about
the Watch List? Or the Evaluate Expression dialog? Or maybe the
Environment window?

Rex Conn
JP Software
 
May 20, 2008
3,515
4
Elkridge, MD, USA
| ---Quote---
|| In a batch file I was debugging I have the command:
|| do dr in /l windsk usrdsk
| ---End Quote---
| Without the body of your DO loop I cannot even begin to guess at
| what you're seeing.
|
| ---Quote---
|| When I use the variable view window to display DR in the loop, the
|| value shown is the expanded alias, not the expanded variable.
| ---End Quote---
| There is no such thing as a "variable view window" -- are you
| talking about the Watch List? Or the Evaluate Expression dialog?
| Or maybe the Environment window?

Sorry, I meant the "watch list". The code is part of a GOSUB without command
line parameters:

do dr in /l windsk usrdsk
pushd %[%dr]
set link=%@expand["* %z.lnk"]
iff defined link then
set used=y
switch %rpt
case SC
shortcut "%@full[%link]"
equals
case HK
echo %@unquote[%@format[35,%link]] %@format[-3,%hk] %dr
endswitch
endiff
popd
enddo

The only command in the fragment that is aliased is EQUALS which uses
ECHO to print a line of equal signs (as a separator).
I put DR in the watch list (Debug -> Add Watch) before entering the DO.
When it became defined (stepping into the DO command) the watch list
displayed the expansion of the alias WINDSK (and later of USRDSK), instead
of the value of e.v. DR, i.e., the string windsk (or usrdsk). However, the
PUSHD command received the correct value, and the batch program worked as
intended. The real problem had been in the filenames located by @expand[].
--
Steve
 
Similar threads
Thread starter Title Forum Replies Date
R bug _ypixels in BDEBUGGER Support 6
T Thanks for the assistance with IDE vs Bdebugger Support 3
cgunhouse SETLOCAL not working in BDEBUGGER Support 9
Peter Murschall V26-Issues in the BDEBUGGER ! Support 11
R Documentation Help Nit > bdebugger View Menu Support 0
Peter Murschall BDEBUGGER "Run to Cursor" - where is it ? Support 1
R Changes to BDEBUGGER menu item keyboard shortcuts in v25 Support 2
Kachupp ide/bdebugger Support 17
rps IDE/BDEBUGGER ? Support 1
Kachupp bdebugger Support 5
Kachupp bdebugger Support 17
Peter Murschall v24 IDE/BDEBUGGER won't start Support 9
Joe Caverly BDEBUGGER and CMDebug Support 2
Joe Caverly Modified Variables in CMDebug/BDebugger Support 1
C BDEBUGGER/IDE crashing Support 1
C BDEBUGGER queryies Support 5
A bdebugger: why it doesnt go inside the "if" statement ? Support 3
MickeyF BDebugger crashes Support 2
jbanaszczyk Bdebugger and breakpoint Support 5
jbanaszczyk bdebugger issues Support 4
cgunhouse Fixed bdebugger with not exist batch file causes a crash Support 2
S BDEBUGGER issue Support 9
samintz Hotkeys for copy/paste do not work in BDEBUGGER Support 4
thedave BDEBUGGER vs not inconsistency Support 15
T bdebugger / ide usage confusion Support 14
S WAD BDEBUGGER command changes window title to "TCC Prompt" Support 4
Frank How to? bdebugger / breakpoints Support 4
Frank watch an array variable in ide/bdebugger Support 2
S WAD Invoking BDEBUGGER changes window title to "TCC Prompt" Support 7
E Ctrl-V does not always work in BDEBUGGER Support 4
S Fixed BDEBUGGER died on invalid watch request Support 4
B Bdebugger doesn't recognize breakpoint after batch file returns Support 2
JohnQSmith IDE / BDEBUGGER Crash Support 0
JohnQSmith IDE / BDEBUGGER Font Support 4
B Bdebugger / IDE editor doesn't display called batch file Support 1
samintz bdebugger issues Support 55
Peter Bratton BDEBUGGER observations Support 4
O Is the bdebugger supposed to debug? Support 1
vefatica BDEBUGGER and Spy++ Support 2
mikea Using BDEBUGGER (and BREAKPOINT) Support 1
mikea BDEBUGGER/IDE questions Support 16
Y BDEBUGGER does not launch Support 8
P BDEBUGGER/IDE does not honour VariableExclude Support 2
P bdebugger / ide issues Support 1
Peter Bratton v10 IDE / bdebugger Support 10
B Keys in debug menu not working in bdebugger Support 1
B bdebugger doesn't load btm-file in window Support 1
B Bdebugger displays an error when typing right square bracket Support 2
S BDEBUGGER problem Support 0
Peter Murschall Some minor flaws Support 15

Similar threads