Debugging a Pear Terminal Application
Last updated
Last updated
Debugging Pear Terminal Applications is different than debugging Desktop Applications because they do not come with a UI. Instead a few steps are needed.
Use together with the Pear Runtime Desktop and use any tool that supports DevTools like Chrome.
First install pear-inspect
:
This code should run as the first thing in the application:
As the code specifies, pear-inspect
is only running when in dev mode, so start the app:
The application will output something similar to:
Open the Pear Runtime Desktop app by running pear run pear://runtime
. Then go to Developer Tooling
and paste in the key.
Note that the key can also be sent to someone else and they can debug the app remotely.
Click on Open in Chrome
or copy the link into a tool that support DevTools.