Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Debug Command in Windows 7?  (Read 57641 times)

0 Members and 1 Guest are viewing this topic.

Nathansswell

    Topic Starter


    Rookie

    Thanked: 1
    • Yes
    • I make music!
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
Debug Command in Windows 7?
« on: March 11, 2012, 04:17:48 PM »
Hi, I have been messing around with the debug command lately and I have made a batch file that works in Windows Xp 32-Bit but does not in Windows 7 64-Bit. I looked in system32 and there wasn't a debug.exe there so I copied it from my Windows Xp computer to my Windows 7 computer. It still will not work. Does it have to do with the 32-Bit or 64-Bit OS's? And if there is a debug.exe for 64-Bit Windows 7 could someone possible show me where to find it? (unless that is illegal) Here is the test code that I used:
Code: [Select]
@Echo Off
@Mode Con Cols=19 Lines=12
Setlocal Enabledelayedexpansion
(
Echo.EB800:148 "Û" 07
Echo.EB800:14A "Û" 07
Echo.EB800:14C "Û" 07
Echo.EB800:14E "Û" 07
Echo.EB800:150 "Û" 07
Echo.EB800:152 "Û" 07
Echo.EB800:156 "Û" 07
Echo.EB800:154 "Û" 07
Echo.EB800:158 "Û" 07
Echo.EB800:15A "Û" 07
Echo.EB800:15C "Û" 07
Echo.EB800:1FC "Û" 07
Echo.EB800:29C "Û" 07
Echo.EB800:33C "Û" 07
Echo.EB800:3DC "Û" 07
Echo.EB800:47C "Û" 07
Echo.EB800:51C "Û" 07
Echo.EB800:5BA "Û" 07
Echo.EB800:5B8 "Û" 07
Echo.EB800:5B6 "Û" 07
Echo.EB800:5B4 "Û" 07
Echo.EB800:5B2 "Û" 07
Echo.EB800:5AE "Û" 07
Echo.EB800:5B0 "Û" 07
Echo.EB800:5AC "Û" 07
Echo.EB800:1E8 "Û" 07
Echo.EB800:288 "Û" 07
Echo.EB800:328 "Û" 07
Echo.EB800:3C8 "Û" 07
Echo.EB800:468 "Û" 07
Echo.EB800:508 "Û" 07
Echo.EB800:5AA "Û" 07
Echo.EB800:1EA "Û" 11
Echo.EB800:1EE "Û" 11
Echo.EB800:1F0 "~" 1E
Echo.EB800:1EC "Û" 11
Echo.EB800:1F2 "" 1E
Echo.EB800:1F4 "~" 1E
Echo.EB800:1F6 "Û" 11
Echo.EB800:1F8 "Û" 11
Echo.EB800:1FA "Û" 11
Echo.EB800:28A "Û" 11
Echo.EB800:32A "Û" 11
Echo.EB800:3CA "Û" 11
Echo.EB800:46A "Û" 11
Echo.EB800:50A "Û" 11
Echo.EB800:50C "Û" 11
Echo.EB800:50E "Û" 11
Echo.EB800:510 "Û" 11
Echo.EB800:512 "" 1E
Echo.EB800:514 "Û" 11
Echo.EB800:516 "Û" 11
Echo.EB800:51A "Û" 11
Echo.EB800:518 "Û" 11
Echo.EB800:47A "Û" 11
Echo.EB800:3DA "Û" 11
Echo.EB800:33A "Û" 11
Echo.EB800:29A "Û" 11
Echo.EB800:298 "Û" 11
Echo.EB800:338 "Û" 1C
Echo.EB800:3D8 "Û" 11
Echo.EB800:478 "Û" 11
Echo.EB800:476 "Û" 11
Echo.EB800:474 "Û" 11
Echo.EB800:472 "Û" 11
Echo.EB800:470 "Û" 11
Echo.EB800:46E "Û" 11
Echo.EB800:46C "Û" 11
Echo.EB800:3CC "Û" 11
Echo.EB800:32C "Û" 1C
Echo.EB800:28C "Û" 11
Echo.EB800:290 "" 1E
Echo.EB800:292 "Û" 11
Echo.EB800:294 "" 1E
Echo.EB800:296 "Û" 11
Echo.EB800:28E "Û" 11
Echo.EB800:3CE "Û" 1C
Echo.EB800:32E "Û" 11
Echo.EB800:330 "Û" 11
Echo.EB800:3D0 "Û" 1C
Echo.EB800:3D2 "Û" 11
Echo.EB800:332 "Û" 1C
Echo.EB800:334 "Û" 11
Echo.EB800:3D4 "Û" 1C
Echo.EB800:3D6 "Û" 1C
Echo.EB800:336 "Û" 11
Echo.Q
)|Debug >nul 2>&1
Pause>nul
Goto :Eof
Anyways, thanks for your help if your reply. :)
-Nathansswell

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Debug Command in Windows 7?
« Reply #1 on: March 11, 2012, 04:38:00 PM »
The program 'debug.com' was first found in DOS a long time ago. It was really a 16 bit program that can run inside the 32 bit OS of most windows versions.
Frankly, any effort now to understand the old 'debug' program is more of a pastime rather that a help to understand Windows 7.

There are some tools used in testing code written in C to verify proper use of CPU features. These are called 'debuggers',  and work with 32 bit code.

What computer language do you prefer? Please do not say batch.

BTW, you should already have read this:
http://www.computerhope.com/debughlp.htm

Salmon Trout

  • Guest
Re: Debug Command in Windows 7?
« Reply #2 on: March 11, 2012, 04:41:06 PM »
What would be the point? Debug.exe runs 16 bit real mode code, either natively (MS-DOS) or in an emulation layer on a 32 bit OS. 64 bit Windows cannot run that code. You could try a virtual DOS environment, maybe.





Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Debug Command in Windows 7?
« Reply #3 on: March 11, 2012, 05:21:03 PM »
I stand corrected. The program s 'debug.exe'  and has not been included in Windows for some time.

For debugging windows programs, this link below may be of interest, but it is not specific to the 64 bit code and would require a 32 bit environment.
From download.com:
Debugging Tools for Windows
Quote
Debugging Tools for Windows is freeware, but it's definitely no bargain. Less experienced users will be disappointed from the start and we suggest you look for a more effective--and easier to understand--debugger.
Not for beginners.

patio

  • Moderator


  • Genius
  • Maud' Dib
  • Thanked: 1769
    • Yes
  • Experience: Beginner
  • OS: Windows 7
Re: Debug Command in Windows 7?
« Reply #4 on: March 11, 2012, 08:32:11 PM »
Kinda cool all that got typed out though...
" Anyone who goes to a psychiatrist should have his head examined. "

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Debug Command in Windows 7?
« Reply #5 on: March 12, 2012, 06:29:41 AM »
debug is actually in the 32-bit version of windows 7, I believe. It's just not in the 64-bit edition; same story for Vista and XP x64.

Almost surely because of two things. First, if they did include it, it would be useless since you can't run it. That's the only reason needed, really, but the second was that it was pretty much a cheap 16-bit assembler/disassembler, which dealt with 16-bit code. And since 16-bit code cannot run on Windows x64 that's a second nail in the coffin.

Notice that there are a lot of other "missing" files. x64 versions of windows don't have program manager (progman.exe), File Manager (winfile.exe), windows write (write.exe) (although, write.exe is aliased to wordpad.exe in all versions of windows since windows 95 through registry magic, iirc). Those utilities we do still have are 64-bit; find, sort, etc come in two versions on x64 machines; a 64-bit version in the C:\Windows\System32 folder, and a 32-bit version in SysWow64. Some programs were phased on simply because there was no point keeping them around. Very few people used Program manager, or File Manager. In fact people that even knew they existed beyond windows 3.1 (if they knew about them at all) are few and far between, so it was not worth the effort to get them compiled even as 32-bit programs.

I think the closest one can get to Debug's functionality on a x64 system would be to use GNU Debug (gdb).

I was trying to dereference Null Pointers before it was cool.

Nathansswell

    Topic Starter


    Rookie

    Thanked: 1
    • Yes
    • I make music!
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
Re: Debug Command in Windows 7?
« Reply #6 on: March 12, 2012, 05:23:22 PM »
Thank you  for all of your replies, I read them all and when I looked at the link http://www.computerhope.com/debughlp.htm I also noticed that it is not available in Windows 7 yet BC_Programmer said it was? (Maybe needs updated?) And sadly, yes, Batch is my favorite (mainly because I know it best), but I do know some basics in VBS, LibertyBASIC, and vb.net. Not enough to make anything great or practical. :/

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Debug Command in Windows 7?
« Reply #7 on: March 12, 2012, 05:33:57 PM »
Microsoft wants yon to forget batch and learn PowerShell.
PowerShell is already on Windows 7.
Windows PowerShell


Nathansswell

    Topic Starter


    Rookie

    Thanked: 1
    • Yes
    • I make music!
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 8
Re: Debug Command in Windows 7?
« Reply #8 on: March 12, 2012, 06:28:55 PM »
 :o :o :o :o :o Forget Batch?!! Never! I love it, but I'll try Powershell, thanks for the suggestion. ;)