  Characterising charge transport in a material is central to the understanding
of its electrical properties, and can usually only be inferred from bulk
measurements of derived quantities such as current flow. Establishing
connections between host material impurities and transport properties in
emerging electronics materials, such as wide bandgap semiconductors, demands
new diagnostic methods tailored to these unique systems, and the presence of
optically-active defect centers in these materials offers a non-perturbative,
in-situ characterisation system. Here, we combine charge-state sensitive
optical microscopy and photoelectric detection of nitrogen-vacancy (NV) centres
to directly image the flow of charge carriers inside a diamond optoelectronic
device, in 3D and with temporal resolution. We optically control the charge
state of background impurities inside the diamond on-demand, resulting in
drastically different current flow such as filamentary channels nucleating from
specific, defective regions of the device. We then optically engineered
conducting channels that control carrier flow, key steps towards optically
reconfigurable, wide bandgap designer optoelectronics. We anticipate our
approach might be extended to probe other wide-bandgap semiconductors (SiC,
GaN) relevant to present and emerging electronic technologies.
