You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since userjs is unusual environment, react devtools browser extensions fails to inspect react code running in such environments.
I try to use the standalone method:
start a local react devtools server (npx react-devtools)
connect to this server in the script targeting unusual environment (the script will be bundled using webpack):
This method works well for script running in a normal web page, in violentmonkey or in webext extensions. But fails for Tampermonkey.
The error is like:
TypeError: Cannot set property error of [object Object] which has only a getter
After hours of research, I figured out this is cause by the code here. The code tries to overwrite built-in console.error with custom handling function.
It seems console.xxx in Tampermonkey environment is read only, thus those errors.
The text was updated successfully, but these errors were encountered:
ChipZhang
changed the title
Failed to run stanalone react-devtools in userjs
Failed to run standalone react-devtools
Jan 13, 2025
Since userjs is unusual environment, react devtools browser extensions fails to inspect react code running in such environments.
I try to use the standalone method:
npx react-devtools
)This method works well for script running in a normal web page, in violentmonkey or in webext extensions. But fails for Tampermonkey.
The error is like:
After hours of research, I figured out this is cause by the code here. The code tries to overwrite built-in
console.error
with custom handling function.It seems console.xxx in Tampermonkey environment is read only, thus those errors.
The text was updated successfully, but these errors were encountered: