Yes, Switzerland in fact broke neutrality during WWII.
Switzerland was in a tense situation from 1922 on when Mussolini took power in Italy. The synonymous use of "people" and "country" lead to the believe that a war with Italy could be coming up, because of the Italian speaking parts of southern Switzerland. When Germany turned into an authoritarian dictatorship from 1933 onwards this became even more immediate.
From 1936 on Swiss and French military officials held meetings in which they discussed the possibility of French support in case of a German invasion of north-western Switzerland.
The result of those talks was the "Manöver H" or "Operation Helvétique". The plan was that in case of a German invasion at least one French division would man the Gempenplateau south of Basel. The Gempenplateau makes for an excellent artillery position because it overlooks the Rhine from Basel to Rheinfelden, the only Swiss cities with bridges big enough to support heavy mechanized troops.
A cooperation in such a scenario has advantages for both sides; the Swiss which could hardly muster enough troops to stop the Wehrmacht. Switzerland had quite a lot of infantry but lacked modern artillery, airplanes and tanks. France on the other side could avoid a flanking of the maginot line in the south.
These plans became formal after the German invasion of Poland, but came never into effect because Germany bypassed the maginot line in the north. Nevertheless there was an aftermath after the Germans discovered the plans in French military offices and used it to blackmail Switzerland.