1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

BDEBUGGER/IDE questions

Discussion in 'Support' started by mikea, Dec 23, 2009.

  1. mikea

    Joined:
    Dec 7, 2009
    Messages:
    210
    Likes Received:
    2
    (Using TCC 11 build 36, running under Win 7)

    I'm still a total TCC newbie (was a heavy 4NT user, though) and am finding the batch debugger somewhat confusing...

    1. Is the debugger fully documented somewhere? I know there is a BDEBUGGER page in the TCC help file. However, it does not cover certain configuration options that I know of -- the options shown in the "Configure IDE..." menu item. Where are these documented? Am I just missing something obvious in the on-line help?

    For example, there are "virtual space" and "collapsible node" options in the debugger. A search of the on-line help turns up nothing for "collapsible" and nothing IDE-related for "virtual." Surely these topics must be documented somewhere.

    2. Another example: I haven't been able to figure out how to permanently set the font size for the editor. Every time I set the size, the next time I open a new .btm file in the debugger, or close and re-open the IDE, the default font size is back. I cannot imagine why I should want it this way. The default font size is too small. I want to keep it larger than the default -- permanently.

    There's no topic about this in the various config options topics, that I know of, and I don't see it in the OPTIONS dialog.

    3. I notice that the "Configure IDE..." menu item is greyed-out when no file is open in the debugger. Does this mean the options cannot be permanently set?

    4. Time was, "setdos /y1" started batch file debugging. Of course this is no longer supported. So I thought I could do it with the single line reading BDEBUGGER within a .BTM file. That certainly launches the batch debugger. But it does not open the current script within the debugger, as "setdos /y1" in a .btm file would do.

    Is there a way to it? I haven't yet found this in the on-line help.

    5. When a .btm file is opened in the IDE, is there some way to "feed" command-line arguments to the .BTM file either before it is stepped-through in the IDE, or change them while stepping is going on? Every other IDE I have used provides this feature. Surely the batch debugger does as well but I cannot find the notes about how it's done. (When I add try to add command-line arguments in the parameters pane, they simply vanish when I start the debugging.)

    6. Is there a way to get the IDE to retain the list of recently edited files between TCC sessions? If I close and re-open TCC, the "Recent Files" list in the IDE no longer contains the names of recently edited files.

    7. Is there some way to preserve a watch-list for environment variables between editing sessions for a given .BTM file?

    8. Is there a quick keystroke for "add to watch-list"? If not, is there a way to configure a new keystroke for it? Having to do several mouse clicks to do this is a bit tedious. An example of an IDE that implements this feature: the Perl editor/debugger PerlBuilder. A single keystroke adds a variable to the watch window. It's fast and convenient that way.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    All supported options are covered in the BDEBUGGER topic.


    Those are editor, not debugger options, and probably aren't going to be of
    any use to you. (When I do find a use for them, I'll document them!)

    Collapsible nodes is only useful when editing non-batch files (like .C or
    .CPP files).

    Virtual Space allows you to position the cursor at any position following
    the end of the line; also not useful in batch files.


    Not reproducible here. (I have never seen that menu entry grayed out, and
    there is no code in the debugger to do that.)


    There is no way to do it; you must start the debugger first and launch the
    batch file from the debugger.


    You pass arguments when you call the debugger; i.e.:

    Bdebugger batfile arg1 arg2 arg3

    You can also add/modify arguments while a batch file is running by selecting
    the "Batch Variables" window. You cannot add arguments before debugging, as
    they will be replaced with the original arguments.


    The MRU list is saved in the registry; it seems to be working here. If you
    have something that's blocking registry access you will not be able to have
    a persistent list.


    Any of the watch / environment / alias etc. windows can be saved to a file
    and reloaded whenever you want.


    Not sure what you want to do here -- if you've selected a variable name, you
    can paste it to the watch list. But if you're editing a file in the editor
    window, there is no keystroke to copy something to the watch list. (Note
    that you can also right-click in the watch list and select a variable from a
    popup list.)

    Rex Conn
    JP Software
     
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,277
    Likes Received:
    38
    TEXT / ENDTEXT blocks can be folded.

    (DO / ENDDO would be another obvious candidate, but there's no easy way to distinguish between the DO command, and the DO keyword used as syntax sugar in the FOR command. And there was some problem with IFF / ENDIFF which I don't recall.)
     
  4. mikea

    Joined:
    Dec 7, 2009
    Messages:
    210
    Likes Received:
    2
    Rex --

    Holiday madness kept me away from the computer for a while -- so to respond to just one part of your reply for now -- concerning the greyed-out Configure IDE... menu item. This is reproducible for me with TCC running under either Win XP on my home machine or Win 7 on my work machine.

    Hopefully I'll manage successfully to upload a small screen shot. What I did to get it: ran TCC. Typed IDE at the prompt to open the IDE. Pressed Alt+O for the Options menu. What you see is what I got right away: the Configure IDE... item is greyed out and cannot be selected. Keeping Alt pressed, I hit PrintScreen, pasted the image into the IrvanView program, then cropped out all but the "salient" portion.

    Again, my hoped-for result is to be set a default font size larger than the default size "out of the box." I can do it temporarily when I'm editing a script, but the updated font size does not stick and I have to increase the size any time the script has been closed and re-opened.

    Is there some place in a config file, or in the Registry, where the default font size and typeface name can also be set?

    I can understand how there might be registry permissions issues under Vista or Win 7, which throw up some permissions hurdles even when the user has "complete" admin access. But XP does not ever seem to have blocked me that way on my home machine.
     

    Attached Files:

  5. Jim Cook

    Joined:
    May 20, 2008
    Messages:
    605
    Likes Received:
    0
    On Thu, Dec 24, 2009 at 11:44 PM, mikea <> wrote:




    TCC 11.00.36 Windows Vista [Version 6.0.6002]
    TCC Build 36 Windows Vista Build 6002 Service Pack 2

    I can reproduce the reported problem as well. When I ran TCMD, I used
    right-click "Run as administrator", in case that's useful information.

    It appears to me that if I have a file open in IDE that I can select
    "Configure IDE..." and when I close that file, the option becomes gray.

    --
    Jim Cook
    2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
    Next year they're Sunday.
     
  6. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    You cannot execute the IDE directly; you can only access the debugger/ide
    through the BDEBUGGER command. (Note that there is no "IDE" command
    documented anywhere in the help.) BDEBUGGER passes several critical
    arguments to the IDE.EXE program.


    There's a bug in the new framework library that resets the font to the
    default at startup; I've fixed it in build 37 (which will be uploaded in a
    day or two).

    Rex Conn
    JP Software
     
  7. mikea

    Joined:
    Dec 7, 2009
    Messages:
    210
    Likes Received:
    2
    The BDEBUGGER topic is named BDEBUGGER / IDE and the syntax example at the start of the topic includes both BDEBUGGER [/C] batchfilename [parameters] and:
    IDE [/c] file
    I think that's where I got the idea that I could type IDE by itself to launch the editing/debugging environment. I thought I would do it both ways to see if the inaccessible "Configure IDE..." menu item behavior would change depending on how I launched the command.

    I see that one person has said he can reproduce the inaccessible-menu-item problem on his system, but when you have the debugger open -- with no file open -- you can select that menu item?
     
  8. mikea

    Joined:
    Dec 7, 2009
    Messages:
    210
    Likes Received:
    2
    To get back to your earlier reply -- and b.t.w., Merry Christmas --

    You're right -- it won't be useful in editing batch files.

    > Not reproducible here. (I have never seen that menu entry grayed out, and there is no code in the debugger to do that.)

    Please see the screen-shot I sent earlier. It really is what I see when there's no file open in the editing environment.

    > There is no way to do it; you must start the debugger first and launch the batch file from the debugger.

    That referred to my mentioning having "BDEBUGGER" as a statement in a batch file open the debugger for that batch file. I will submit it as a feature-request.

    > The MRU list is saved in the registry; it seems to be working here. If you have something that's blocking registry access you will not be able to have a persistent list.

    There's nothing on my XP system that'd be blocking Registry access (can't say for sure on my Win 7 machine at work, as I'm still pretty new to Win 7 and its security features). By any chance does the use or non-use of SHRALIAS have any effect on this?

    > if you've selected a variable name, you can paste it to the watch list.

    I missed that in the on-line help. But perhaps I'm not yet looking in the right places. Is pasting into the watch list documented in the BDEBUGGER topic page? If not -- in some other place? I'd like to make sure I read all of the documentation about .btm file debugging...

    I'm trying it now: I highlight a variable name within the editing buffer, then press Control+C. Then I click in the watch window until an editable field "opens" on the line where I clicked. Then I press Control+V. Result: the variable name is pasted at the cursor position in the editing pane, not at the cursor position in the Watch pane. If I right-click and select Paste instead, then it is pasted at the cursor position in the Watch pane.

    At the time when Control+V pastes into the editing window, the apparent focus is the Watch pane -- not the editing pane.

    Same result if I use Edit>Paste: double-click in the Watch pane to create an editable text field. Select Edit>Paste. Result: the string in the clipboard is pasted into the editing pane, not the Watch pane.

    So the copy/paste approach appears to work only if you select Paste from the context menu. Is that expected?
     
  9. mikea

    Joined:
    Dec 7, 2009
    Messages:
    210
    Likes Received:
    2
    I'm trying this now with a batch file open in the debugger. I press F5 to start debugging and then "step into" for one line. Then I click the tab for "Batch Parameters" (I don't see a "batch variables" tab). Once the batch file is being stepped through, in that pane I see:

    0=C:\TakeCommand\test.btm

    I click on the line below that. What do do now? Let me try this:

    1=some_argument

    ... and then click the "step into" control again.

    The "1=some_argument" disappears.

    So -- what's the correct procedure for adding an argument at this point?

    Next attempt: I add a line "set somevariable=%1" to my test batch file, and run "bdebugger test.btm hello". The watched "somevariable's" value is of course shown as "hello" once that statement is executed.

    But then, how to edit it? I can't produce any editable text field for the variable's value by double-clicking in the Watch pane. I can change its value in the Environment pane, but that does not update it within the Watch pane. What's the correct procedure for editing a variable's value while stepping through the batch file?

    So far, I'm finding that the selections in the toolbar appearing just above the watch/environment/(etc.) tabs at the bottom of the screen work with nearly all of the panes selected, but not with the Watch pane. When I'm viewing that pane and I click its toolbar icons, nothing at all happens. One exception: the Delete functionality works if an item in the watch window is selected such that an editable text field appears for that item. But the other toolbar items don't work (including Help).
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    But that syntax REQUIRES one or more filenames, and you didn't provide any.

    The Options menu entry invokes a dialog that configures the editor. If you
    don't have an editor window open, the menu entry is disabled and you won't
    get the dialog.
     
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    That will never happen -- it would require seriously crippling the debugger
    by reverting to a line debugger (like the old 4NT debugger).

    The debugger runs the batch file; the batch file does not run the debugger.

    Rex Conn
    JP Software
     
  12. mikea

    Joined:
    Dec 7, 2009
    Messages:
    210
    Likes Received:
    2
    Ok, maybe my confusion has partly to do with terminology. I thought the editor window would be considered open if the development environment (launched via the BDEBUGGER command) is open.

    But it sounds as if it has to be opened, and a document has to be open within it for the Options menu to appear. Fair enough. I will wait for the next update to see if I can get the font size to stick by changing it in the Options dialog.

    But in the meantime: is the font-name and font-size information stored in the Registry? A search within various JPSoftware keys in the Registry did not turn up "font". In the short term I don't have a problem setting it that way. Can that be done?

    Or -- is it stored in an .INI configuration file somewhere?
     
  13. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    You didn't save it -- click on the "Apply" button.


    You cannot change a batch parameter in the Watch pane; you can only change
    it in the Batch Parameter pane, by editing it & saving it (as above).

    Rex Conn
    JP Software
     
  14. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    The editing toolbar icons will only work if you've selected an entry in the
    first (Name) column. You cannot edit the value column. (It wouldn't be
    useful in most cases, as the name could be an internal variable, variable
    function, UDF, or an expression.)

    The help button has been fixed in build 37.

    Rex Conn
    JP Software
     
  15. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    "LogFont", in the registry. It's a binary key value; if you try to edit it
    you will destroy it!

    Rex Conn
    JP Software
     
  16. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    Regarding your desire to have a keystroke to add a variable to the watch
    window -- you do know that there's a menu entry ("Add to Watch") to add the
    currently selected variable name to the Watch List, right? And that you can
    customize Take Command menus to add accelerator keys to any menu entry?

    Rex Conn
    JP Software
     
  17. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,728
    Likes Received:
    80
    Not reproducible here. Assuming that the Watch pane is active, I can't see
    any way (other than a Windows bug?) that the paste could go to the wrong
    window.

    Anybody else able to reproduce this?

    Rex Conn
    JP Software
     

Share This Page