The closest thing I can think of which might answer this question is the trench periscope. It was like a pair of stationary binoculars, yet able to look above a trench like the periscope of a submarine. It was more like battlefield surveillance than spying.
Barbed wire and sandbags protected the men inside from enemy attacks. Also, if they were desperate, they would place bodies or "home-made" wooden stakes as spears to ward off the enemy.
Trench Warfare.
Trench warfare is famous because of its large scale use during World War 1. During the war, both sides used this type of warfare for protection.
"Trench warfare was used in World War I"
Ypres, Belgium
The Western Front (in France and Belgium) where both sides were very evenly matched, and the defense proved much stronger than the offense. On other fronts in World War 1, trench warfare was not necessary.
Trench Warfare.
Trench Warfare
Trench warfare is famous because of its large scale use during World War 1. During the war, both sides used this type of warfare for protection.
trench warfare
Trench warfare.
Trench warfare
trench
Trench warfare was one of the new forms of warfare introduced during World War 1. Another new form of warfare was chemical warfare.
Trench
trench fighting
trench fighting
"Trench warfare was used in World War I"