I can get this data on the Edge family of devices (from my paired Di2 system), and within the simulator.
I *cannot* access this data on the Forerunner family of devices, neither on an actual device or the simulator.
The documentation for this object and these data points (e.g. https://developer.garmin.com/downloads/connect-iq/monkey-c/doc/Toybox/Activity/Info.html#frontDerailleurIndex-instance_method) notes no access or device restrictions, suggesting this is a bug.
You can easily recreate this by using the following compute(info) method, noting the that the values for frontDerailleurGear and rearDerailleurGear are -1 (meaning null) for the Forerunner devices, and valid/accurate on Edge.
function compute(info) {
var frontDerailleurIndex = -1;
if(info has :frontDerailleurIndex) {
frontDerailleurIndex = info.frontDerailleurIndex;
}
Sys.println("Front Derailleur: " + frontDerailleurIndex);
var rearDerailleurIndex = -1;
if(info has :rearDerailleurIndex) {
rearDerailleurIndex = info.rearDerailleurIndex;
}
Sys.println("Rear Derailleur: " + rearDerailleurIndex);
}