Debug: s (search)

Searches a range of addresses for a pattern of one or more byte values.


s range list


range : Required. Specifies the beginning and ending addresses of the range you want to search.

list : Required. Specifies the pattern of either one or more byte values or a string on which you are searching.

?: Displays a list of debug subcommands.


Windows XP does not use this command. It is accepted only for compatibility with MS-DOS files. 

Specifying valid range entries

Use range with a debug subcommand to specify a range of memory. You can choose one of the following formats for range: a starting address and an ending address, or a starting address and the length (denoted by l) of the range. For example, both of the following syntaxes specify a 16-byte range beginning at CS:100:

cs:100 10f

cs:100 l 10

Using list 

When you use the list parameter, separate each byte value with a space or comma and enclose string values in quotation marks (that is, "string"). If list contains more than one byte value, Debug.exe displays the first address where the byte value occurs only. If list contains one byte value, Debug.exe displays all addresses where the value occurs in the specified range.


To find all addresses in the range CS:100 through CS:110 that contain the value 41, type:

scs:100 110 41

Debug.exe displays the results in the following format:


To search for the string "Ph" in the range CS:100 through CS:1A0, type:

scs:100 1a0 "Ph"

Formatting legend



Information that the user must supply


Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output


Debug subcommands

Command-line reference A-Z

© 2016 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies