You don't need nvidia insight or step through the shader. Just print out abs(sin(time)) in the main loop of your application to see if it really oscillates between 0 and 1.
You must have the time value anyway because you need to update the uniform, so this is just a std::cout or printf.
Hint: The “problem” as actually visible with one short look. But we do it step by step just for the lulz.
You apparently don't know the difference between a shader program and the calling application. The shader has no main loop, it is being called from outside the loop of your application. printf is not a glsl but a c function. Apart from that, pls. read up on shader uniforms. You must set the value of u_time (it is a uniform) in the shader from out of your application, it is not a built-in of glsl.
The mix function is actually used very often. Get one ready for use in C or C++ (the OpenGL documentation has the trivial formula), so you can test things like these from outside of your application. That would have shown you that it works, but little happens, because with the given values it interpolates between two very similar colours and the difference is not easily recognizable.
It seems to me like he's copied together stuff from learnopengl .com, e.g.
// build and compile our shader zprogram
Shader ourShader("4.2.texture.vs", "4.2.texture.fs");
and the book of shaders.
Interesting though that you see a change, it's only the green channel that changes and i had to choose two more distinctive colors to atcually realize something.
Will take this as an excuse to buy me a new monitor when the shops open again. Something huge :-)
I think it's much more likely that the value of u_time either doesn't change, or it doesn't change ENOUGH.
One way to debug this is to temporarily replace u_time with 0.0, 0.5, and 1.0 as example inputs, and see if the color is different. Another would be to use something like abs(sin(u_time*10)) to make it change faster.
A third way to debug this would be to set the output color to something like (u_time*0.01, u_time, u_time * 100.0, 1.0) and see what the color channels come out as.
As for why u_time might not change, or not change enough, that's up to the hosting application. If you're using some kind of shader editor online, you have to look at the documentation for that application.
Yeah, the uniform doesn't change. That's where i wanted to go with him with debugging stepwise. But printf in the shader drove me off.
I tried the colour change with a text shader i just had open, and believe it or not, the difference between the two colours is only very hard to see with text in small letters over a foggy landscape :-)