Hi Guys,
You can rest assured that the pro's and con's of modern fighting-aircraft armament is worked-through in great detail. As far as "dogfighting" goes, I think it harks-back to the days of simple gun equipped aircraft. Even by the start of WW2 there were great attempts at developing the range and hitting power of the guns, to expand the kill opportunities in a combat.
Being unseen or unsighted is a great advantage, however, that is a perfect scenario and a modern fighter has to plan on being detected and still winning!
So, going from the gun first, you have to achieve a targeting solution to hit. That means being fairly close. Modern Air to Air guns are very good, and the ranges are far better than WW2, but it is still close, and therefore the most demanding on a manoeuvering target. Modern gunsights are fantastic, but you still need to get the pipper on the target, but if you do, you can hit. However, here we should consider the gun we are using. Some multi-barrel gattling guns have a delay before achieving a RoF (rate of fire) which can be a disadvantage in a hard fight. Good fixed barrel cannon like the BK27 hit full RoF instantaneously and are great for snap shots. Also, head to head (180/0) is possible, coupled with a modern sight.
Next missiles. Close-ish range IR or imaging missiles are a bit like long range guns but have become great for off-boresight engagements and other advanced homing that means you don't have to be pointing at your target. Missiles generally can be vulnerable to countermeasures.
Longer range missiles bring further advantages of stand-off, but they have to be very good.
Overall, I would suggest that in many (modern) circumstances, the gun is the fallback option but, it is reliable, unjammable (the bullet, not the gun) and great fun to practice!
Eng