# DisplayInDebugConsole
{: .no_toc }

Opens a file and prints all its shell properties to the Debug console.

Syntax: **DisplayInDebugConsole** [ *FilePath* ]

*FilePath*
: *optional* A **String** containing the full path of the file whose shell properties are printed. If omitted or empty, a file dialog is displayed so the user can choose a file.

The procedure opens the specified file through **FilePropertyExplorer** and iterates over every property in the returned **FileProperties** collection, printing the system property name and its localized value to the Debug console with `Debug.Print`.

When *FilePath* is omitted or empty, **FilePropertyExplorer.BrowseAndOpenFile** is called instead of **FilePropertyExplorer.OpenFile**, which displays a file dialog.

### Example

This example prints the shell properties of a specific file by passing a path, then repeats the call without a path to let the user choose a file interactively.

```tb check_build
' Print properties for a known file.
DisplayInDebugConsole "C:\Windows\notepad.exe"

' Print properties for a file chosen via dialog.
DisplayInDebugConsole
```

### See Also

- [Example](/tB/Packages/Contributed/FileProps/Example/index.md) module
- [FilePropertyExplorer](/tB/Packages/Contributed/FileProps/FilePropertyExplorer/index.md) class
- [BrowseAndOpenFile](/tB/Packages/Contributed/FileProps/FilePropertyExplorer/BrowseAndOpenFile.md) method
- [OpenFile](/tB/Packages/Contributed/FileProps/FilePropertyExplorer/OpenFile.md) method
- [FileProperties](/tB/Packages/Contributed/FileProps/FileProperties/index.md) class
