Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
At a glance
Goal: Filter Dev Proxy to only intercept requests from specific apps
Time: 3 minutes
Prerequisites: Set up Dev Proxy
By default, Dev Proxy is registered as a system wide proxy and all requests made by your machine are passed through the proxy.
By default, the proxy intercepts requests that are made from your machine to the URLs configured in devproxyrc.json file.
However, you might also want to only intercept requests being made from specific processes such as a command prompt window or web browser.
To intercept request from processes by their given process IDs, use the --watch-pids option:
devproxy --watch-pids 870 135100
To intercept request from processes by their given process names, use the --watch-process-names option:
devproxy --watch-process-names msedge pwsh
Intercept requests from child processes
By default, Dev Proxy only intercepts requests made directly by the processes that you specify. If the process that you watch starts other processes, such as a shell running a script or an editor running a language server, Dev Proxy doesn't intercept requests from these child processes. To also intercept requests from all descendants of the watched processes, add the --watch-process-tree option:
devproxy --watch-process-names pwsh --watch-process-tree
Alternatively, set the watchProcessTree property to true in your configuration file:
{
"$schema": "https://raw.githubusercontent.com/dotnet/dev-proxy/main/schemas/v4.0.0/rc.schema.json",
"watchProcessNames": ["pwsh"],
"watchProcessTree": true
}
The --watch-process-tree option only has effect when you also use --watch-pids or --watch-process-names.
See also
- Discover URLs to watch - Filter by process during discovery
- Glossary - Dev Proxy terminology