📄 wguidrnt.gml
字号:
the instructions displayed before the fault.
.endbull
.*
.section &drnt.: Other Options
.*
.np
.ix 'Auto Log' 'in &drnt'
.ix '&drnt' 'Auto Log'
.ix 'Log Restarted Processes'
When the Auto Log option is selected, &drnt creates a log file when an
exception occurs and then terminates the application instead of
revealing the exception dialog.
.np
The Max Log File Size option allows you to set the maximum size in
bytes for a log file. When the log file exceeds this size, &drnt
prompts you with a message box when you start the application.
.keep 14
.figure *depth='2.02' *scale=100 *file='DRW14' A message box prompts you to erase the log file when it becomes larger than the maximum log file size specified on the Log File Options dialog.
.np
This message box offers you the opportunity to delete your log file
before it becomes uncontrollably large.
.*
.endlevel
.*
.endlevel
.*
.section *refid=drntat Attaching Processes to &drnt
.*
.np
.ix 'Processes' 'attaching to &drnt'
.ix '&drnt' 'attaching processes to'
Attaching processes to &drnt enables it to monitor events that occur
within the processes. When processes are attached, &drnt reports on
events that occur within your process, such as DLL loads, thread
creations, and thread terminations. Attaching also allows &drnt to
detect exceptions in your process.
.np
There are four ways to attach processes to &drnt:
.begbull $compact
.bull
Command line
.bull
Add New process menu item
.bull
Auto Add Process feature
.bull
Process Control dialog
.endbull
.np
&drnt cannot detach from processes to which it is attached. The
attachment exists until the process terminates. If you try to close
&drnt while it is attached to processes, a warning box appears listing
the processes to which &drnt is still attached.
:CMT. .figure *depth='1.xx' *file='DRWx' A warning box appears when you try to close &drnt while it is still attached to processes.
.np
Select Yes or No to continue.
.*
.beglevel
.*
.section Command Line
.*
.np
You can run a program and attach &drnt to it at start-up by passing
the path of the executable to &drnt as a command line parameter. For
example, to run the program
.fi foo.exe
and attach &drnt to it, type:
.millust drwatcom foo.exe
.np
.ix 'command line parameter'
If you often want to run a certain program with &drnt attached to it
then you can create a Program Manager icon that runs &drnt with the
name of the program as a command line parameter.
.np
Double clicking on the icon when &drnt is not running causes &drnt to
start-up. &drnt then starts the specified process and attaches to it
immediately.
.np
Double clicking on the icon when there is already an instance of &drnt
running causes the existing instance of &drnt to run the specified
process and attach to it. The second &drnt terminates immediately so
that only one instance of &drnt is left running.
.*
.section Add New Process
.*
.np
.ix 'Process' 'add new'
.ix '&drnt' 'add new process'
The Add New Process item in the Process menu is another way to start a
new process and attach to it immediately.
.begstep To start a new process using this item:
.step Choose Add New Process
from the Process menu.
.result
This opens the Load Process dialog where you browse the file structure.
.step Select the program
you want to start with &drnt attached.
.step Click on OK.
.result
This runs the selected program and attaches to it immediately.
.endstep
.*
.section Auto Add Processes
.*
.np
.ix 'Process' 'auto add'
.ix '&drnt' 'Auto Add Process'
Checking the Auto Add Process item in the Process menu tells &drnt to
attach to all new processes that start in the system. When you
activate this feature, &drnt checks the system every few seconds for
new processes. When it finds them, it attaches to them. &drnt will not
automatically attach to processes that began before the Auto Add
Process item was checked.
.np
The disadvantage of this feature is that in the few seconds between
&drnt's process checks, your process can start-up, run, and possibly
cause an exception. When this occurs, a system dialog box appears
reporting the error. Selecting OK on this dialog immediately may not
allow &drnt sufficient time to attach to the faulting process. Wait
for a few seconds and select the OK button on this dialog. The dialog
closes and &drnt attaches to the faulting process. The &drnt exception
dialog then appears and you can proceed as usual.
.begnote
.note Note:
Occasionally, when this feature is active a message box may appear
saying, "An unexpected failure occurred while processing a
DebugActiveProcess API request. You may choose OK to terminate the
process or Cancel to ignore the error". This message results from a
known limitation in Win32. If it appears simply choose Cancel.
.endnote
.*
.section Process Control
.*
.np
.ix 'Process Control'
.ix '&drnt' 'Process Control'
Using the Add Process button on the Process Control dialog, you can
attach &drnt to any process that is currently running in the system.
.begstep To do this follow these instructions:
.step Choose Process Control
from the Process menu or the system menu.
.result
This opens the Process Control dialog which lists all processes
currently running under Windows.
.step Click on the process
to which you want &drnt to attach.
You can only select one process at a time.
.step Select the Add Process
button.
.result
This attaches &drnt to the selected process. An asterisk appears to
the left of this process indicating that &drnt is currently attached
to it.
.endstep
:CMT. .figure *depth='1.xx' *file='DRWx5' The Process Control dialog displays all currently running processes.
.*
.endlevel
.*
.section Performing Process Control
.*
.np
.ix 'Process Control' 'performing'
.ix '&drnt' 'performing Process Control'
Selecting Process Control from the process menu or the system menu
opens the Process Control dialog. This dialog lists all processes
currently running under Windows. Any process to which &drnt
is attached is marked with an asterisk. When you select a process by
clicking on it, the Selected Process section of the dialog displays
its Process ID, Name, and Priority.
:CMT. .figure *depth='1.xx' *file='DRWx' The Selected Process section of the Process Control dialog displays summary information for the selected process.
.np
The Refresh button on this dialog updates the displayed process
information.
.np
From this dialog you can perform several functions. This section
describes each function.
.begnote
.note Important:
The Process Control functions are extremely powerful and give you the
ability to perform functions that can make the operating system
unstable. Because of this, it is wise to save information before you
attempt to use the Process Control functions.
.endnote
.*
.beglevel
.*
.section Setting the Process Priority
.*
.np
Each process in the system has an assigned priority class. This
priority class establishes the schedule for running processes. The Set
Priority button on the process Control dialog allows you to assign a
priority to the selected process.
.begstep To set a process's priority:
.step Select the process
from the Process List to which you want to assign a priority.
.step Select the Set Priority
button.
.ix 'Set Priority'
.result
This opens the Set Process Priority dialog which displays the priority
classes: idle, normal, high, and real time.
.step Select the desired priority
for the selected process.
.step Click on OK
to assign the priority and close the Set Process Priority dialog.
.endstep
:CMT. .figure *depth='1.xx' *file='DRWx' In the Set Process Priority dialog, you choose the desired priority for the selected process.
.*
.section Terminating a Process
.*
.np
.ix 'Kill Process'
.ix 'Process' 'terminate'
.ix 'Process Control'
.ix '&drnt' 'terminate a process'
The Kill Process button on the Process Control dialog terminates a
process selected from the Process List in the Process Control dialog.
.begstep To terminate a process:
.step Choose Process Control
from the Process menu.
.result
This opens the Process Control dialog containing a list of all
processes currently running in the system.
.step Click once on the process
you want to terminate to select it.
.step Select the Kill Process
button.
.result
This terminates the selected process. The process's entry in the list
may not be removed until you select the Refresh button.
.endstep
.*
.section Viewing the Threads for a Process
.*
.np
.ix 'Threads' 'viewing for a process'
.ix '&drnt' 'viewing threads'
A process is made up of one or more threads. The View Threads button
in the Process Control dialog opens a Thread Control dialog that lets
you view and manipulate the threads for the selected process. With
this dialog, you can terminate, suspend, and resume threads.
.begstep To view the threads for a process:
.step Select the process
from the Process List whose threads you want to view.
.step Select the View Threads
button from the Process Control dialog.
.result
This opens the Thread Control dialog which displays the threads that
make up the selected process.
.endstep
:CMT. .figure *depth='1.xx' *file='DRWx' From the Thread Control dialog box, you can terminate, suspend, and resume threads.
.np
Selecting a thread from the Threads list displays information for that
thread in the Selected Thread section of the dialog. This information
is:
.begpoint $break
.point tid (Thread Id)
A unique identifier assigned by the operating system to each thread in
the system.
.point State
Indicates the current state of the thread. This tells you if the
thread is currently ready for execution or if it is waiting for some
event.
.point Priority
The thread's current priority class
.endpoint
.np
Use the Refresh button to update the information displayed in the
Thread Control dialog.
.*
.beglevel
.*
.section Terminating a Thread
.*
.np
.ix 'Thread' 'terminate'
.ix 'Kill Thread'
.ix '&drnt' 'terminate a thread'
Use the Kill Thread button to terminate a thread.
.np
To terminate a thread, select the desired thread from the Threads list
and select the Kill Thread button.
.*
.section Suspending a Thread
.*
.np
Each thread has a suspend count. A thread can only be scheduled for
execution when its suspend count is zero. To increment a thread's
suspend count, select the thread on the list in the Thread Control
dialog and press the Suspend button.
.*
.section Resuming a Thread
.*
.np
.ix 'Thread' 'resume'
.ix '&drnt' 'resume a thread'
Each thread has a suspend count. A thread can only be scheduled for
execution when its suspend count is zero. To decrement a thread's
suspend count, select the thread on the list in the Thread Control
dialog and press the Resume button.
.*
.endlevel
.*
.section Viewing the Memory for a Process
.*
.np
.ix 'Memory' 'viewing for &drnt process'
.ix '&drnt' 'viewing memory for a process'
Selecting the View Memory button on the Process Control dialog opens a
Memory Walk window for the currently selected process. For information
on this window, see the section entitled :HDREF refid='drntvi'..
.*
.section Summarizing Process Memory Usage
.*
.np
Selecting the Memory Info button on the Process Control dialog opens a
Memory Information dialog box. This dialog provides a breakdown of the
memory usage for the process selected from the Process List.
.np
To view this memory information, select the desired process from the
Process List and select the Memory Info button.
.np
The Memory Information dialog displays information in the following
sections:
.begbull $compact
.bull
Mapped and Committed memory
.bull
Reserved Memory
.bull
Memory Usage by Module (Address Space)
.endbull
:CMT. .figure *depth='1.xx' *file='DRWx' The Memory Information dialog summarizes the memory usage of the selected process.
.np
The Mapped and Committed section displays the amount of committed
memory the application is using broken down by its protection.
.np
The Reserved section displays the amount a memory reserved but not yet
committed. This information is broken down by its protection.
.np
In the Address Space section of this dialog, you can view the memory
usage of each module that the selected process currently has loaded.
The combo box in this section lists all modules the process has
loaded. Selecting a module from the combo box displays a summary of
its memory usage. Selecting the All Images item in the combo box
displays the total memory usage by all loaded modules listed in the
combo box.
.np
Use the Refresh button to update the information displayed in the
Memory Information dialog box.
.*
.endlevel
.*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -