My issue is specifically related to debugging those elements that render on the [root] via the virtual DOM. Most specifically, the materialUI AutoComplete component. I need to style it to fit several color themes, therefore I can't use style:{{color:#eee}}
because that would override the default color and replace it by a new one. Instead I need to play around with specificity to make it white, or black, or red, etc, according to the parent theme that I am using.
Anyway, It is impossible for me to inspect it in Chrome Dev Tools because once the mouse leaves the autoComplete input, the dropdown closes and I can't inspect it. Normally, I counter this by using debugger;
or The Sources section of Chrome Dev Tools but reactJS scripts compile and bundle through webpack, so they are impossible to access in dev tools as well.
Does anyone know how I can stop a reactJS script at the Autocomplete line in the component class?
class Header extends React.Component {
render() {
return (
<section>
<div> SOme code here</div>
//debug somewhere inside the autocomplete below to stop it as it renders
<AutoComplete
className='search-item'
style={{width: '100%'}}
hintText="Type anything"
filter={AutoComplete.caseInsensitiveFilter}
fullWidth={true}
dataSource={shortcutsData}
/>
</section>
);
}
}
The link below shows the non-reactJS way. Which doesn't work for me
How to pause JS script execution at a specific line?
Thanks in advance